在my.cnf [mysqld]栏添加 skip-grant-tables

然后重启/etc/init.d/mysqld restart

mysql

##select password('新密码')

update mysql.user set password=password('新密码') where user='root' and host='localhost';

注释到my.cnf中的skip-grant-tables重启mysql

相关文章:

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