mysql之windows忘记密码

步骤:

1. 关闭mysql服务
2. mysqld --skip-grant-tables;
3. 新cmd,执行mysql
4. use mysql;
5. update mysql.user authentication_string=password('123456') where user='root' and host='localhost'; // set password=password('123456')在跳过权限下无效
6. flush privileges;

 

posted @ 2018-07-19 19:27  maoriaty  阅读(85)  评论(0编辑  收藏  举报