Mysql5.7破解root密码

  • A+
所属分类:默认

 
 

停止mysql服务

Mysqld --skip-grant-tables //windos

 
 

mysqld_safe --skip-grant-tables &
//linux

 
 

使用mysql -u root 直接进行登陆

等进去之后执行 mysql> flush PRIVILEGES;

重新设置密码 mysql> alter user 'root'@'localhost' identified by '1234567';

执行 mysql> flush  tables; 并退出

头像

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: