原因:mysql版本身份验证引起的,

官网解释:https://dev.mysql.com/doc/refman/8.0/en/caching-sha2-pluggable-authentication.html

解决方法:

1.查询mysql数据库中user表plugin列的值,是否如下

mysql 报错Authentication method 'caching_sha2_password' is not supported.

如果不同请如下操作:

       1.1:ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #修改加密规则 

        1.2:ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; #更新一下用户的密码 

        1.3:FLUSH PRIVILEGES; #刷新权限 

        1.4:再重置下密码:alter user 'root'@'localhost' identified by '123456';

2.修改配置文件如下:

mysql 报错Authentication method 'caching_sha2_password' is not supported.

default_authentication_plugin=mysql_native_password添加到配置中。

3.重启服务。

4.完成

相关文章:

  • 2021-07-15
  • 2021-07-21
  • 2022-12-23
  • 2021-04-30
  • 2022-12-23
  • 2021-09-25
  • 2022-01-26
猜你喜欢
  • 2021-12-12
  • 2022-12-23
  • 2022-12-23
  • 2021-08-30
  • 2021-12-27
  • 2022-12-23
  • 2021-08-02
相关资源
相似解决方案