Remote connect to db from script at another host


#1

I have set up a test db under my mysql host here at DH, and added several Allowable Hosts. I’m attempting to remotely access the db from another website running a script on a shared server at another hosting company, but I keep getting the failure message:

Warning: mysql_connect() [function.mysql-connect]: Can’t connect to MySQL server on ‘mysql.****.com’ (4) in /home/content/…/html/test.php on line 11

However, using the same test.php file that produces this error at the other host works here at DH, so I can rule out a script error. That leaves 2 possibilities:

  1. I have setup my Allowable Hosts incorrectly. If this is the case then I’m confused because I added %.godaddy.com (the other host), %.mydomain.com, the shared hosting server IP, and my unique IP on the shared server.

  2. I am unable to remotely connect to my DH db from another website. The documentation (http://wiki.dreamhost.com/Migrate_MySQL) mentions third party programs, and I assumed that meant PHP scripts running on a web server.

Any ideas? Thanks in advance.


#2

Do a few cURLs or wgets from your GD server to your DH server and check the logs here to see how it connects.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#3

Thanks. GD doesn’t allow shell access on shared hosting accounts :frowning:


#4

Test some backtick calls or exec() in PHP. They used to work over there, could be a chance they still do :wink:

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost