ERROR 1130: Host ''is not allowed to connect to thisMySQL server, 1130 thismysql
One user asked for help today, saying that PHPmyadmin can connect to the database normally. An error is reported when sqlyog is used:
ERROR 1130: Host '2017. 27.214.1 'is not allowed to connect to thisMySQL server
Root case: by default, all MySQL accounts are not allowed to log on remotely.
Solution:
1. Modify the user table
Mysql-u root-p
Mysql> use mysql;
Mysql> update user set host = '2017. 27.241.1 'where user = 'root ';
Mysql> flush privileges;
2. Specify authorization
Mysql-u root-p
Mysql> use mysql;
Mysql> grant all privileges on *. * TO 'root' @ '172. 27.241.1 'identified BY 'mypassword' with grant option;
Mysql> flush privileges;
Note:
1. Precise authorization, that is, the account, the host, and the required permissions must be specified. It is best not to grant wildcard authorization;
2. Remember to flush privileges after executing each command;
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.