Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I can connect to database with phpMyAdmin, but I cannot connect with Sequel Pro, using the same credentials. The host is mysql50-33.wc2.dfw1.stabletransit.com. When I connect using phpMyAdmin I notice it points to IP "172.17.70.16", but when I try mysql50-33.wc2.dfw1.stabletransit.com as host in Sequel Pro, I get this message:

Unable to connect to host mysql50-33.wc2.dfw1.stabletransit.com, or the request timed out.

Be sure that the address is correct and that you have the necessary privileges, or try increasing the connection timeout (currently 10 seconds).

MySQL said: Lost connection to MySQL server at 'reading initial communication packet', system error: 61

And when I try 172.17.70.16, I get this message:

Unable to connect to host 172.17.70.16, or the request timed out.

Be sure that the address is correct and that you have the necessary privileges, or try increasing the connection timeout (currently 10 seconds).

MySQL said: Can't connect to MySQL server on '172.17.70.16' (4)

I am on Mac OS 10.6.7.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I am assuming you are using shared hosting.

Basics:

phpMyAdmin is running on the web server and connecting to MySQL either on the local machine or via an IP Address that is configured on the MySQL server to allow connections. In your case the IP is it connection to is a non-routable IP internal to your host (See RFC1918)

When you attempt to connect from your desktop you will be connecting directly to the MySQL server, and not through the web server.

The problem:

First,y ou do not have the correct IP address of the database server you are connecting to. The URL you provided may or may not actually resolve to the IP address of the database server. It may be the IP adress of a phpMyAdmin server, or your web server. There is no way to know without asking your host.

Second, the MySQL server is most likely not configured to allow direct connections from your machine's IP address OR the host's firewall is blocking you from connection to their network on that port.

Solution:

First, find out the correct public IP address of the MySQL server.

Second, if your host allows it, add your IP Address to the list of IPs allowed to connect to the database. If your host is cPanel based, which most shared hosts are, it should be very easy to add this. If your host does not allow this, then unfortunately, you will be out of luck and have no choice but to use phpMyAdmin.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.