Files hosted on DreamHost, MySQL hosted by another provider


The files will be hosted on DreamHost, but for development purposes (aka: before client has paid), MySQL will be hosted on another host provider. Lets say MySQL will be on: Godaddy, RackSpace, JustHost, or a server at the office.

When attempting to make a simple connection, such as:

// Create connection

// Check connection
if (mysqli_connect_errno())
echo "Failed to connect to MySQL: " . mysqli_connect_error();

An error is received on DreamHost:

color=#800000: Can’t connect to MySQL server on ‘IPAddress’ (110)[/color]

Reading through threads, someone recommended to go to DreamHost, click on Databases, click on a db-user, and add an allowable host. I did, but that user name is not on the MySql host company anyway, how does that help?

Called the other host company to see if they could look through their logs. Nothing is showing after and different attempts and different scripts from DreamHost to connect to this different MySQL host provider.

Someone recommended SSH, but what commands would you send?


What you need to know is if the other hosting provider allows external database connections. At dreamhost you found the mechanism where you can add IPs to do just that, what you need to find is the same function on their system, I’m sure they don’t just leave the mysql servers open to the outside world.


Yeah, pinged the DreamHost domain name to get the IP Address, logged into the other provider to add the IP address. But no luck. Called the other provider to look at their logs and they’re saying the test page hosted on DreamHost isn’t even reaching their servers / db logs.