mysql更改root密码及root远程登录

1.更改root密码

1 use mysql;
2 update user set password=password('petecc') where user='root';

2.root远程登录

1 update user set host='%' where host='localhost';
2 flush privileges; 

  

原文地址:https://www.cnblogs.com/smstars/p/3890400.html