centos mysql忘记密码找回(仅限mysql5.7)

1、停掉mysql
2、执行#mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
3、#mysql
4、update mysql.user set authentication_string=password('XXXXXXXX') where user='root';
5、flush privileges;
6、quit
7、重启mysql

posted on 2018-11-18 20:26  范兵  阅读(378)  评论(0编辑  收藏  举报

导航