I’m trying (and failing) to connect to one of my DreamHost MySQL databases from a non-DreamHost domain using PHP.
Using the same PHP script, I CAN connect from my localhost server, from my DreamHost domain, but not from the non-Dreamhost remote domain.
I CAN connect from the non-Dreamhost domain using a shell account (via PuTTY) and the MySQL command line. I have added all the necessary IP addresses to the DreamHost MySQL whitelist, as indicated by the fact that I can connect via the MySQL command line interface from the non-DreamHost domain.
The error message I get when I run my PHP page from the non-DreamHost domain is:
Connect Error (2003) Can’t connect to MySQL server on ‘mydhdb.otherdomain.org’ (110)
I know that I’m trying to connect to the correct DreamHost database because if I enter an incorrect database in my PHP script, the page returns an immediate error, while error above takes about 30 seconds to time out.
phpinfo() indicates that the non-DreamHost domain, which is running Apache, has both the mysql and mysqli libraries activate.
Anyone know how to get more detailed MySQL debug information or have any suggestions as to the reason for the failure?
Thanks