Linux under MySQL Error 1130 cannot be accessed remotely
Description: The remote connection to MySQL always reported Erro 2003:can ' t connect to the MySQL server on ' 211.87.***.*** ' (111), yesterday looked for several hours to find a solution, as follows: ...
Recently done Linux project to MySQL database, but remote connection MySQL always reported Erro 2003:can ' t connect to MySQL server on ' 211.87.***.*** ' (111), It took several hours yesterday to find the solution, as follows:
1.sudo gedit/etc/mysql.my.cnf
Find Bind-address =127.0.0.1
Modified to Bind-address =0.0.0.0
2.sudo/etc/init.d/mysql restart
In this case, if you try a remote connection again, the error 1130 (HY000) is reported: Host ' 211.87.***.*** ' is not allowed to connect to this MySQL server prompt, and the database cannot be connected remotely.
On MySQL host, follow the instructions below
Mysql-u root-p//Enter the MySQL console
Mysql>use MySQL;
Mysql>update User Set host = '% ' where user = ' root '; This command can be skipped when executing an error
Mysql>flush privileges;
Mysql>select host, user from user; Check that '% ' is inserted into the database
Mysql>quit
MySQL Error 1130 under Linux cannot be accessed remotely (GO)