免责声明:网站内容仅供个人学习记录,禁做商业用途,转载请注明出处。

版权所有 © 2017-2020 NEUSNCP个人学习笔记 辽ICP备17017855号-2

Navicat 连接 mysql 8 报错 2059 - Authentication plugin 'caching_sha2_password' cannot be loaded解决办法

hxy    2021年4月8日 09:32:42

从错误信息可知caching_sha2_password不能加载。

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

大安装Mysql数据库的主机上登录Mysql对应的用户,上面连接时用的用户为root,所以我们登录root用户。

连接数据库口执行命令:

use mysql;

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

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

执行命令

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

或者

alter user 'root'@‘localhost' identified with mysql_native_password by '123456';



最近更新: 2021年4月14日 13:49:09
浏览: 1.4K

[[total]] 条评论

添加评论
  1. [[item.time]]
    [[item.user.username]] [[item.floor]]楼
  2. 点击加载更多……
  3. 添加评论