Wednesday 9 May 2012

ERROR 2003 (HY000): Can't connect to MySQL server on 'ip_address' (110)

If you came across this error, because it is in the 2000's error codes then it is a MySQL client error, this means that the connection that you are trying to establish doesn't reach the server, it stops somewhere before that.

If you are trying to connect to a remote MySQL server one common cause it's the firewall on the MySQL server host machine.

You'll have to set some exceptions for your firewall. So if you have Windows 7 do the following:

Control Panel -> Windows Firewall -> Allow a program of Feature through Windows Firewall



Once in the "Allow programs to communicate through Windows Firewall" click the button "Allow another program.."


and if it's not in the list that appears after clicking the button browse to the location where the executable is placed. In my case is:

"C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld.exe"

After you find the executable select it, click Open and in the next window click Add.

This will take you back to the  "Allow programs to communicate through Windows Firewall" window. Click OK.


1 comment: