myini文件增加命令

 

(1)在my.ini文件的[mysqld]块下增加“skip_grant_tables”,然后重启mysql服务,再以管理员权限打开cmd执行一些列命令重置密码

 mysql 重置root密码

 

mysql> use mysql;
Database changed
mysql> update user set authentication_string=password('***') where user='root' and Host='localhost';

Query OK, 1 row affected, 1 warning (0.00 sec)

 

 

改完之后 把ini文件的skip那个删掉

 

 

登录之后报错

mysql 重置root密码

 

You must reset your password using ALTER USER statement before executing this statement.

 mysql 重置root密码

通过命令 :


SET PASSWORD = PASSWORD('xxxxx')

 

相关文章:

  • 2021-08-13
  • 2021-07-18
  • 2022-12-23
  • 2021-11-07
猜你喜欢
  • 2021-09-12
  • 2021-07-31
  • 2021-05-29
  • 2021-11-21
  • 2022-01-27
  • 2022-01-08
相关资源
相似解决方案