Remote MySQL Connecton Problems
| From: | Ray Hauge | Date: | Thu, 07 May 2009 02:50:09 +0000 |
| Subject: | Remote MySQL Connecton Problems | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-292372@lists.php.net to get a copy of this message | ||
Hello everyone,
I've run into a bit of a sticky situation trying to connect to a remote MySQL database. Here's the background:
Connecting from the command line on the web server works.
Connecting from a different vhost works.
There's no information in mysql_error. In fact, mysql_select_db('db') or die(mysql_error()); doesn't produce any output.
The only way I know this isn't working is when I try to run a query, the result resource is NULL.
If I copy the contents of the query and run it on the command line, from the web server, I get the results I expected.
I manage both servers. I added the new login on the MySQL server and also ran flush privileges. I've gone so far as to reboot both the MySQL process and the apache process.
The versions of MySQL are slightly different 5.0.24a (web) vs 5.0.36(db).
It's getting late and I'm just grasping for straws.
Thanks!
Ray