Suresh Payankannur

Saturday, September 17, 2011

Can't connect to MySQL server error 111

Even after granting privilege to connect from a different host, still getting an error in connecting to MySQL server from a different box:

mysql -u <user-name> -p -h <mysql-server-ip> <mysql-database-name>

Can't connec to MySQL server on '<your-ip-address>' (111)

MySQL is only listening to localhost interface. To fix the problem, edit /etc/mysql/my.cnf and comment out the line:

# bind-address =

And restart the mysql service

sudo service stop mysql
sudo service start mysql


Post a Comment

Blog Archive

Scroll To Top