打开CMD窗口

net stop mysql          //停止MYSQL

mysqld  -nt  --skip-grant-tables  //跳过密码检测。 mysqld.exe在Bin目录下

然后另外新打开一个cmd窗口

输入mysql 直接回车可以以root权限进入mysql

use mysql

update user set password=password("新密码") where user="root";

flush privileges;

如果无错误提示,密码即可更改成功。

相关文章:

  • 2022-02-28
  • 2021-07-12
猜你喜欢
  • 2021-05-28
  • 2022-12-23
  • 2021-07-20
  • 2022-12-23
  • 2021-10-26
  • 2021-09-18
  • 2022-03-03
相关资源
相似解决方案