MYSQL不允许远程访问的解决办法

问题:pymysql.err.InternalError: (1130, "Host 'Chen-PC' is not allowed to connect to this MySQL server")

 

解决方案:

进入自己的MySQL,执行以下代码即可实现远程访问。

use mysql;
 
select host from user where user='root';
 
update user set host = '%' where user ='root';
 
flush privileges;

 

posted @ 2020-05-04 09:53  丑丑的大灰狼  阅读(173)  评论(0)    收藏  举报