1.设置密码
1
ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';
2.修改host
1
update user set host='%' where user='root';
3.刷新权限
1
flush privileges;
1
ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';
1
update user set host='%' where user='root';
1
flush privileges;