gvp16 Posted September 24, 2010 Share Posted September 24, 2010 Hi, I have a reseller hosting account, on which I have a mysql database. how can i connect to the database from a different domain? Ive seen before that when connecting with php you can use the IP address of the server. Or wont this work in this case? Thanks. Link to comment https://forums.phpfreaks.com/topic/214295-mysql-connection-help/ Share on other sites More sharing options...
PFMaBiSmAd Posted September 24, 2010 Share Posted September 24, 2010 Or wont this work in this case? What happened when you tried the IP address of the mysql server? Link to comment https://forums.phpfreaks.com/topic/214295-mysql-connection-help/#findComment-1115134 Share on other sites More sharing options...
gvp16 Posted September 24, 2010 Author Share Posted September 24, 2010 I think it said couldn't connect Link to comment https://forums.phpfreaks.com/topic/214295-mysql-connection-help/#findComment-1115136 Share on other sites More sharing options...
gvp16 Posted September 24, 2010 Author Share Posted September 24, 2010 access denied is the error, just checked. Link to comment https://forums.phpfreaks.com/topic/214295-mysql-connection-help/#findComment-1115141 Share on other sites More sharing options...
PFMaBiSmAd Posted September 24, 2010 Share Posted September 24, 2010 Do you normally enter a DNS name, such as mysql.somedomain.com as the host name? Try that as well. And posting whole error messages helps about ten times more than posting your interpretation of what the error message is. xxxxx out any information in the error you don't want to show. Link to comment https://forums.phpfreaks.com/topic/214295-mysql-connection-help/#findComment-1115143 Share on other sites More sharing options...
gvp16 Posted September 24, 2010 Author Share Posted September 24, 2010 I normally enter "localhost" as all sites at the moment are hosted on the same server, but im looking to connect a site on a different server to my database. This is the error Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'glowormd_geraint'@'MANCLINUX2.NETWORKDNS.BIZ' (using password: YES) in /home/glowormd/public_html/www.xxxxxxx.com/global.php on line 6 Could not open database Thanks. Link to comment https://forums.phpfreaks.com/topic/214295-mysql-connection-help/#findComment-1115219 Share on other sites More sharing options...
gvp16 Posted September 24, 2010 Author Share Posted September 24, 2010 ive cracked it! needed to use my server IP address and add the ip address of the connecting server to the remote mysql option in cpanel! Thanks anyway Link to comment https://forums.phpfreaks.com/topic/214295-mysql-connection-help/#findComment-1115223 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.