Linking Mysql Databases on several sites to 1 Admin Area

by 5 replies
6
Hope some one can help, I have taken over hosting of several sites recently, while switching over one site, was able to re-establish the database in the Admin area of that site. There are still 3 other sites now on a different server that were linked to this admin area via a database on each of the sites. All sites have a SSL Certificate and therefore a unique IP Address.
Each of the sites still collects the information ok and can be retrieved by going into phpmyadmin, however what we need to do is link these 3 sites/mysql databases to the main admin site which is now on a totally different IP address and Server (Previously all 4 were on same server, but diff IP).

Question is Can this be done easily? Question 2 is, if we can. How?

All sites are in normal HTML if that helps.

Appreciate any help on this.
#programming #admin #area #databases #linking #mysql #php #sites
  • If this was possible previously, then yes, it should be possible now as well.

    You just need to make sure that you can connect to the old mysql servers over the web. Ask your provider if you are in doubt. Then instead of entering "localhost" as their hosts just enter the other sites' IPs. (In the configuration file that you should have)
    • [1] reply
    • Thanks Tashi, however the programmer I have tried this and had no luck connecting the 2.

      Any other suggestions from anyone?
  • Any admin script should be able to connect to a remote MySQL database, but you will have to make sure that the server providing the data allows remote access. Often you will need to add the "admin server" as an IP address in the allowed access list.

    One other hiccup might be in your admin script, if it is not designed to maintain multiple MySQL connections at one time.

    -Ryan
  • Your host will need to set it up for you. By default, a user from one site can't be given permission to access a database owned by another user.
  • You can set it up yourself. In cpanel towards the bottom of the mysql tab is a option to add remote hosts.

    You'll still have to make sure your new host can maintain multiple connections as mentioned above though.

Next Topics on Trending Feed

  • 6

    Hope some one can help, I have taken over hosting of several sites recently, while switching over one site, was able to re-establish the database in the Admin area of that site. There are still 3 other sites now on a different server that were linked to this admin area via a database on each of the sites. All sites have a SSL Certificate and therefore a unique IP Address. Each of the sites still collects the information ok and can be retrieved by going into phpmyadmin, however what we need to do is link these 3 sites/mysql databases to the main admin site which is now on a totally different IP address and Server (Previously all 4 were on same server, but diff IP).