进入mysql:
mysql -uroot -p
运行mysql:
use mysql;
查看用户表:
SELECT `Host`,`User` FROM user;
更新用户表:
UPDATE user SET `Host` = '%' WHERE `User` = 'root' LIMIT 1;
强制刷新权限:
flush privileges;
关闭mysql:
exit;
————————————————
原文链接:https://blog.csdn.net/asdXT/article/details/89312908