Hi all,
I am a student trying to access a database that is on a different server than where my web pages are stored. My webpages running PHP scripts are here (128.118.142.34 through 128.118.142.46) and my database is here (146.186.83.60)
Here is the code that I implemented:
$con = mysql_connect(146.186.83.60, username, password) or die ('Error connecting to mysql');
mysql_select_db(databasename, $con);
The IP is where my database is located, but I get an error message:
Warning: mysql_pconnect() [function.mysql-pconnect]: Can't connect to MySQL server on '146.186.83.60' (4) in /pass/home/14/t/tmv105/www/Connections/diehl.php on line 9
Fatal error: Can't connect to MySQL server on '146.186.83.60' (4) in /pass/home/14/t/tmv105/www/Connections/diehl.php on line 9
Might I be being denied access due to a firewall, and if so, is there PHP code to work around this?