1.关闭MySQL服务
管理员身份cmd 输入命令
net stop MySQL57
2.修改参数文件调过MySQL密码验证
找到MySQL的my.ini文件,打开文件在[mysqld]节点下方添加代码
skip-grant-tables = true
mysql5.7修改密码
mysql5.7修改密码
3.保存文件,重启服务

net start MySQL57

4.进入MySQL
mysql -u root 直接回车
5.修改密码
update mysql.user set authentication_string = password(‘123456’) where user=‘root’;
6.刷新权限
flush privileges;
7.将参数文件my.ini 里之前添加的代码删除掉
8.重启MySQL服务
9.用新密码登录
mysql5.7修改密码

相关文章:

  • 2021-04-18
  • 2021-09-20
  • 2021-08-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
猜你喜欢
  • 2021-06-17
  • 2021-09-04
  • 2022-01-07
  • 2022-01-19
  • 2021-09-19
  • 2022-12-23
  • 2021-12-05
相关资源
相似解决方案