1.停止mysql


2.命令行启动mysql
mysqld --defaults-file="c:\mysql\mysql server 5.1\my.ini" --console --skip-grant-tables


3.无密码登录后执行以下sql
update mysql.user set password = password('123456') where user = 'root';
flush privileges;

 

一切恢复正常!

相关文章:

  • 2022-01-06
  • 2021-08-09
  • 2021-04-05
  • 2021-08-14
  • 2022-03-01
  • 2022-02-11
猜你喜欢
  • 2022-02-10
  • 2021-12-01
  • 2021-05-29
  • 2022-12-23
  • 2021-04-17
  • 2022-12-23
相关资源
相似解决方案