vim /etc/my.cnf
添加此行
skip-grant-table
如何解决mysql数据库忘记密码
systemctl restart mariadb
mysql
select user,password,host from mysql.user;
如何解决mysql数据库忘记密码
update mysql.user set password=password(“123456”) where user=“root” and host=“localhost”;
flush privileges;
\q
vim /etc/my.cnf
注释添加的那行
如何解决mysql数据库忘记密码
systemctl restart mariadb
如何解决mysql数据库忘记密码
登录成功。

相关文章:

  • 2021-12-11
  • 2021-11-03
  • 2021-11-27
  • 2021-11-28
  • 2021-11-28
  • 2021-11-28
猜你喜欢
  • 2021-12-21
  • 2021-11-28
  • 2021-12-08
  • 2021-11-24
  • 2021-05-01
相关资源
相似解决方案