pymysql.err.InternalError: (1130, "Host '127.0.0.1' is not allowed to connect to this MySQL server")的错误解决

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

使用下列步骤解决即可:

mysql -u root -p

mysql>use mysql;

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

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

mysql>flush privileges;

以上。

参考:https://blog.csdn.net/appleyuchi/java/article/details/103941664

posted @ 2020-07-16 10:30  洪荒少男~  阅读(1708)  评论(0编辑  收藏  举报