MySQL重置密码

别说谁变了你拦得住时间么 提交于 2020-02-12 16:23:26

1:停止服务

net stop mysql

2:设置密码为空

mysqld --user=mysql --skip-grant-tables --skip-networking&

3:开启服务

net start mysql 

4:登录

mysql -u root mysql 

5:修改密码

mysql> update user set authentication_string=password('123456') where user='root
' and host='root' or host='localhost';

6:重启服务。然后再登录就可以了。

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!