修改MySQL密码

1. 在配置文件中添加一行skip_grant_tables

添加

2. 重启服务

3. 进入MySQL数据库中,不用输入密码回车即可

4. 输入 update mysql.user set authentication_string=password('123qqq...A')   where user='root' and host='localhost';

 命令

 

 5. 刷新 FLUSH PRIVILEGES

 

 6. 退出数据库 exit

 7. 重启数据库

posted @ 2020-05-26 11:33  zsh~  阅读(93)  评论(0编辑  收藏  举报