ID #1007

Error no. 2003: Can't connect...

 

The error message

 

Error No. 2003: Can't connect to MySQL server on 'localhost' (or some other host)

 

simply means that connection is not possible for one of the following (or similar) reasons:

* There is no MySQL server running at the specified host

* Connection to the MySQL server is not allowed using TCP-IP. Check the 'skip-networking' setting in the MySQL configuration file (my.ini on Windows, my.cnf on Unix/Linux). It shall be commented out like '#skip-networking'. If it is not commented out, then do it and restart the MySQL server for the change to take effect. SQLyog needs to connect using TCP-IP.

* Some networking issue prevents connection. It could be a network malconfiguration or a firewall issue. We have experienced sometimes that some firewalls (ZoneAlarm in particular) is blocking TCP-IP connections even if it claims to be disabled. Most often it will help to uninstall and reinstall the firewall.

* When trying to connect to a MySQL server at an ISP this error message often indicates that direct connection to MySQL has been blocked. You must then use HTTP-tunneling or SSH-tunneling to connect.

* Also this FAQ may have relevant information. It describes some more special situations when connection to MySQL on Linux.

 

Tags: -

Related entries:

You can comment this FAQ

Comment of G.Zanferrari:
I was no allowed to connect with SqlYog to mysql installed on another server. The problem was that the default root user created at installation the 'localhost' permissions has.
Thus: root@localhost

I changed it to:

root@%

and the problem was solved.
Added at: 2007-03-29 10:01

Comment of Hammad:
On windows, you need to turn off windows firewall or let traffic on your mysql server port through on both sides - the client and server machine.
Added at: 2011-10-17 04:43

Comment of Andrew:
If you're trying to connect to a SQL Server hosted by a host such as iPage, you need to connect using HTTP Tunneler because the port is blocked. This is easy, simply upload the SQLyogTunnel.php file from the SQLyog root directory to the root directory of your server then use the HTTP tab when making a new connection.
Added at: 2013-10-11 05:15