I'm trying to get apache2.2.6 to connect to a remote mysql5.1.22 DB using php5.1.6 but getting the following error when trying to connect:
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'testDB' (13) in /var/www/html/test.php on line 3
Could not connect to the database. Error = Can't connect to MySQL server on 'testDB' (13).
If I run "php test.php" on the command-line it connects to the remote DB fine:
# php test.php
<br>Successfully connected to MySQL database server.
<br>Now closing the connection...
<br>MySQL connection closed successfully as well.
I know php support is working on apache because I have a basic .php I use to verify that and is displaying php code fine. Here's a list of the php-related rpm's installed on the webserver:
# rpm -qa|grep -i php
Here's a list of mysql-related rpm's on the webserver:
# rpm -qa|grep -i mysql
# rpm -qa|grep http
My php5 module is loaded:
# httpd -M (produces):
My DB is compiled from source (didn't think that would make a difference), but here's the ver:
# mysql --version
mysql Ver 14.14 Distrib 5.1.22-rc, for redhat-linux-gnu (i686) using EditLine wrapper
Does anybody know of other ways I can troubleshoot this? I've tried cranking up the apache logs to debug, but still not seeing additional info.
Any help with this would MUCH appreciated.. I'm out of ideas