pymysql.err.InternalError: (1130, Host '127.0.0.1' is not allowed to connect to this MySQL server)
首先采用[1]:
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;
然后采用
?
mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> update user set plugin='mysql_native_password' where User='root';
Query OK, 1 row affected (0.07 sec)
Rows matched: 1 ?Changed: 1 ?Warnings: 0
?
[2]提供了簡單的使用pymysql的增刪改查的操作
?
[1]https://blog.csdn.net/maybeoneday/article/details/79050153
[2]https://blog.csdn.net/zupzng/article/details/80035412
總結
以上是生活随笔為你收集整理的pymysql.err.InternalError: (1130, Host '127.0.0.1' is not allowed to connect to this MySQL server)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: mysql8安装后初始化密码
- 下一篇: 查看mysql8的log位置