mysql忘记密码

在/ect/my.cnf中添加如下:
skip-grant-tables
sudo mysqld restart
mysql回车,进入到sql
>user mysql;
>update user set authentication_string=password('123qwe') where user='root' and Host = 'localhost';
搞定;
删掉skip-grant-tables;
sudo mysqld restart
完事;

posted on 2017-09-03 21:43  下士闻道  阅读(146)  评论(0编辑  收藏  举报

导航