Mysql 8.0破解密码


一、停止服务

service mysqld stop

二、增加绕过验证配置

vim /etc/my.cnf
#增加下列配置
skip-grant-tables 

三、重启mysql

service mysqld start

四、清空密码

mysql -uroot -p
update mysql.user set authentication_string='' where user='root' and host='localhost';

五、注释步骤三配置,然后重启mysql

vim /etc/my.cnf
#skip-grant-tables
service mysqld restart

六、空密码登录后修改root密码

alter user root@localhost identified by 'root';


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM