Authentication plugin ‘caching_sha2_password‘ cannot be loaded:

执行命令

use mysql;

select user,plugin from user where user='root';

可以看到当前用户的加密方式为caching_sha2_password

执行命令

alter user 'root'@'%' identified with mysql_native_password by '123456';

flush privileges;

能连接了。

以上报错是由于目前已有的客户端连接软件还不支持Mysql8新增加的加密方式caching_sha2_password,所以我们需要修改用户的加密方式,将其改为老的加密验证方式。

猜你喜欢

转载自blog.csdn.net/hebsun/article/details/108683152