ERROR 1130 (HY000): Host '172.16.1.54' is not allowed to connect to this MySQL server

centos7.5 远程连接数据库报错

问题:

[root@db04-54 ~]# mysql -urep -p123 -h172.16.1.51
Warning: Using a password on the command line interface can be insecure.
ERROR 1130 (HY000): Host '172.16.1.54' is not allowed to connect to this MySQL server

原因:

在创建远程连接的时候指定了10.0.0.%网段,实际远程连接的时候用的是172.16.1.%网段

解决方法:

方式1:修改用户,指定172.16.1.%网段

方式2:连接的网段是10.0.0.%

原文地址:https://www.cnblogs.com/lvhanzhi/p/10628737.html