wsh-ning

停止mysql 进程。

使用管理员权限运行cmd。

输入以下代码:

安装目录\mysql\bin\mysqld.exe --defaults-file="安装目录\mysql\my.ini" --console --skip-grant-tables;

注:--skip-grant-tables 是跳过密码验证,放到配置文件中就不用进行以下步骤。

这个cmd窗口放着不用管,再开一个,直接打开,不需要管理员权限。

输入以下代码:

安装目录\mysql\bin\mysql.exe

UPDATE mysql.user SET authentication_string=password(\'123456\') WHERE user=\'root\' and Host = \'%\';

flush privileges;

SET password for \'root\'@\'localhost\'=password(\'123456\');

搞定,然后开启服务,使用账号:root,密码:123456

分类:

技术点:

相关文章:

  • 2021-12-05
  • 2021-11-20
  • 2022-01-20
  • 2021-12-25
  • 2022-01-01
  • 2021-12-04
猜你喜欢
  • 2021-11-26
  • 2021-09-22
  • 2021-06-11
  • 2021-06-22
  • 2019-01-07
  • 2021-11-28
  • 2021-11-28
相关资源
相似解决方案