第一步:登入

mysql -u root -p

第二步:查看加密规程

 select user,plugin from user where user='root';
 
 结果显示
 +------+-----------------------+
| user | plugin                |
+------+-----------------------+
| root | caching_sha2_password |
+------+-----------------------+

第三步:修改加密规则

ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;

第四步:重修修改密码

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '131556';

第五步:刷新

FLUSH PRIVILEGES;

相关文章:

  • 2021-05-18
  • 2021-11-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
  • 2022-12-23
  • 2021-09-20
猜你喜欢
  • 2020-11-03
  • 2022-12-23
  • 2021-03-29
  • 2021-04-19
  • 2021-06-07
  • 2021-08-25
相关资源
相似解决方案