argrafic Posted February 29, 2008 Share Posted February 29, 2008 Hello all. So far, of all the websites I've developed both the website and the database are in the same server. But I just finished a website but the client has 2 different servers, one where the website will live and another one where the database is stored. What's the configuration or how do I make the connection to the other server? Is it just writing instead of localhost in the $host part of the DB connection I write the address? Thanks!! Link to comment https://forums.phpfreaks.com/topic/93729-database-and-website-in-different-servers/ Share on other sites More sharing options...
conker87 Posted February 29, 2008 Share Posted February 29, 2008 I'm not sure how getting information from db's on different servers, but I'm assuming you need to put in the MySQL host ip (or domain) into the $host. Link to comment https://forums.phpfreaks.com/topic/93729-database-and-website-in-different-servers/#findComment-480280 Share on other sites More sharing options...
Barand Posted February 29, 2008 Share Posted February 29, 2008 Either the servername or server IP instead of localhost Link to comment https://forums.phpfreaks.com/topic/93729-database-and-website-in-different-servers/#findComment-480334 Share on other sites More sharing options...
argrafic Posted March 6, 2008 Author Share Posted March 6, 2008 i get the error: Warning: mysql_pconnect() [function.mysql-pconnect]: Can't connect to MySQL server on '10.9.2.100' (10065) in C:\Inetpub\vhosts\apatrimonial.com.mx\httpdocs\pruebas\Connections\AP.php on line 9 Fatal error: Can't connect to MySQL server on '10.9.2.100' (10065) in C:\Inetpub\vhosts\apatrimonial.com.mx\httpdocs\pruebas\Connections\AP.php on line 9 connection issues or permission issues? Link to comment https://forums.phpfreaks.com/topic/93729-database-and-website-in-different-servers/#findComment-485486 Share on other sites More sharing options...
Barand Posted March 6, 2008 Share Posted March 6, 2008 IF it's permissions the error is usually "access denied for user xyz@abc" Link to comment https://forums.phpfreaks.com/topic/93729-database-and-website-in-different-servers/#findComment-485498 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.