Connect two database at a time

by 7 replies
8
I have one question. Can i connect one hosting database to anther hosting.

Example:
Website 1: www.abc.com is hosted in Hosting 1 and Website 2: www.xyz.com is hosted in Hosting 2
When someone open www.abc.com i want to add data/value in hosting 2 database. Website 1 also have database i don't want to close his connection.
#programming #connect #database #time
  • Hello,
    Create two instances for the databases.
    Then you can use the instances where ever you need.
    • [2] replies
    • Sure; there's no reason why you can't have two connections. Obviously, you'll need to specify the remote host name, rather than using the local host, but that should be fine.
      • [1] reply
    • Please re-read the original question.
  • You might need to ask your host to allow you to do this too.
  • Hey,

    If your both hosting is using cPanel, there is place where u can allow remove connection.


    On www.xyz.com, you add there IP of www.abc.com and backwards on www.abc.com cPanel.

    After that, u can access xyz database from abc using IP of xyz, instead of "localhost" when u connect to database.

Next Topics on Trending Feed