WARNING in log: (OperationalError('(pymysql.err.OperationalError) (1130, "x.x.x.x\' is not allowed to connect to this MySQL server")',),)

原因:不容许本地机器连远程mysql服务。

使用下列步骤解决即可:

1,登录mysql

mysql -u root -p

2,切换到mysql库

mysql>use mysql;

3,执行如下命令

mysql>select 'host' from user where user='root';

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

mysql>flush privileges;

 

posted @ 2021-03-02 17:46  乱炖er  阅读(1082)  评论(0编辑  收藏  举报