1、cmd窗口关掉服务(8表示mysql版本)
net stop mysql8
2、无密码启动mysql服务
mysqld --console --skip-grant-tables --shared-memory
mysql.exe -uroot
4、用sql命令把root密码设置为空
update mysql.user set authentication_string='' where user='root';
5、刷新权限,密码就重置为空了
flush privileges;
6、我们可以查看下修改好的密码
select host,user,plugin,authentication_string from mysql.user;
最后
以上就是犹豫战斗机最近收集整理的关于mysql8忘记密码后重置密码的全部内容,更多相关mysql8忘记密码后重置密码内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复