首页 > 数据库技术 > 详细

mysql8.0版本忘记root密码

时间:2018-11-28 21:18:00      阅读:178      评论:0      收藏:0      [点我收藏+]

1、先关掉系统服务

net stop mysql

2、进入mysql安装目录的bin文件中,以管理员的方式运行cmd,然后输入如下命令,实现无密码登陆

mysqld --console --skip-grant-tables --shared-memory

3、以空密码登入系统

mysql.exe -u root

4、重置密码

UPDATE mysql.user SET authentication_string='root' WHERE user='root' and host='localhost';

5、ok

mysql8.0版本忘记root密码

原文:https://www.cnblogs.com/twodoge/p/10034405.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!