victorfrost

1、修改my.cnf配置文件

vi /etc/my.cnf

#允许免密认证登陆
skip-grant-tables = true

2、重启Mysql数据库并登陆数据库修改root用户密码

systemctl restart mysqld
mysql -uroot
mysql> update mysql.user set authentication_string = \'password\' where user=\'root\';

3、恢复my.cnf配置文件并重启数据库

vi /etc/my.cnf

#允许免密认证登陆
#skip-grant-tables = true

systemctl restart mysqld

分类:

技术点:

相关文章:

  • 2021-10-10
  • 2021-11-07
  • 2022-01-31
  • 2022-12-23
  • 2021-06-04
  • 2021-07-10
  • 2021-11-21
  • 2021-12-04
猜你喜欢
  • 2022-02-07
  • 2021-12-04
  • 2021-08-13
  • 2021-05-21
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案