‘Host’ is not allowed to connect to this mysql server

‘Host’ is not allowed to  connect to this mysql server

        mysql 数据库不允许远程连接

方法一:修改 host 表

       进入mysql数据库,选择mysql 

mysql> use mysql;

   选择 host 表

mysql> select host from user;

   更新 host, 然后退出。

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

    重启数据库, 完成。

# service mysqld restart

    

 --------------  打赏码  --------------------------------    

原文地址:https://www.cnblogs.com/Jomini/p/10750277.html