修改MySQL密码

1,进入MySQL控制台

mysql -u root -p

然后输入密码,登录成功。

2,进入mysql数据库

use mysql;

3,更新root的密码

update user set authentication_string=password("新密码") where user='root';

4,刷新,退出。

flush privileges;
exit;

密码修改完成~!

原文地址:https://www.cnblogs.com/xianxh/p/9372213.html