首先采用[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