mysql忘记密码

更改配置文件my.conf

增加一行

skip-grant

重启mysql 就可以用mysql直接登陆

use mysql

update user ser password=password(‘password’) where user=’root’;

改回my.conf 重启mysql

posted @ 2018-04-04 17:16  俊偉  阅读(122)  评论(0编辑  收藏  举报
回顶部