UbH Posted January 25, 2008 Share Posted January 25, 2008 Is it possible to connect to a MySQL database from another site?? See I have a work related site thats going to be hosted on our web server here at work, but they have no plans to setup a MySQL database on it for me. However I have my own site and hosting that has an abundant amount of database space so I was wondering if I can run PHP scripts from this work web server, that would connect to my hosting MySQL databases?? Sorry if this seems like a n00b questions. Also what would they connect code look like if I am able to do such a thing?? Quote Link to comment https://forums.phpfreaks.com/topic/87834-connect-to-mysql-from-another-site/ Share on other sites More sharing options...
bschultz Posted January 25, 2008 Share Posted January 25, 2008 instead of using "localhost" in the connect part of the script, use the IP address of the server with the DB on it. Quote Link to comment https://forums.phpfreaks.com/topic/87834-connect-to-mysql-from-another-site/#findComment-449322 Share on other sites More sharing options...
UbH Posted January 25, 2008 Author Share Posted January 25, 2008 Awesome thanks m8!! now where is the number to my hosting solution Quote Link to comment https://forums.phpfreaks.com/topic/87834-connect-to-mysql-from-another-site/#findComment-449338 Share on other sites More sharing options...
revraz Posted January 25, 2008 Share Posted January 25, 2008 My Webhost doesn't allow any connections from outside the domain, so hopefully yours does. Quote Link to comment https://forums.phpfreaks.com/topic/87834-connect-to-mysql-from-another-site/#findComment-449366 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.