修改 root 的连接限制, host=’%' 为允许所有 IP 都有连接权限
# mysql -u root -p
Enter password:
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/qq_40572277/article/details/85993760