ERROR 2003 (HY000): Can’t connect to MySQL server on (111) – Solution


The error message:

ERROR 2003 (HY000): Can't connect to MySQL server on 'IP address' (111)

Appears white an attempt to connect to MySQL server remotely.


By default the MySQL server is configure to disallow any remote access. The only accepted connection are allowed from the localhost thus IP address. This configuration can be found in main MySQL configuration file /etc/mysql/my.cnf:

bind-address           =

To make MySQL server allow connection from any remote IP address amend the above line to or comment the entire line:

bind-address           =
#bind-address           =

And restart your MySQL server:

# service mysql restart
[ ok ] Stopping MySQL database server: mysqld.
[ ok ] Starting MySQL database server: mysqld ..
[info] Checking for tables which need an upgrade, are corrupt or were 
not closed cleanly..