2013-07-30

MySQL Error 1130 "Host 'xx.xx.xx.xx' is not allowed to connect to this MySQL server."

When I tried to connect a mysql server from outside today morning, I got a mysql error like:

ERROR 1130: Host 'xx.xx.xx.xx' is not allowed to connect to this MySQL server.


That means the mysql server is configured to allow only local connections. The configuration can be modified easily in mysql tables.

Under terminal, type the following commands

> mysql -u root -pmypassword

mysql> use mysql;

mysql> update user set host = '%' where user = 'root';

mysql> flush privileges;



Now you could connect the mysql server from the outside client.