1、打开 mysql 数据库
use mysql;
2、查看 user 数据表当前已有的数据
select * from user \G;
3、修改一条 root 数据,并刷新MySQL的系统权限相关表
update user set Host = ‘%’ where Host = ‘localhost’ and User=’root’;
flush privileges;
use mysql;
select * from user \G;
update user set Host = ‘%’ where Host = ‘localhost’ and User=’root’;
flush privileges;