使用navicat连接mysql数据库时,报错2059 - Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen

问题

在mac上,使用.dmg文件安装了mysql8.0.14,使用navicat连接mysql数据库时,报错:

2059 - Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(../Frameworks/caching_sha2_password.so, 2): image not found

解决

连接不上的原因是客户端不支持caching_sha2_password的密码加密方式。那么,我们修改用户密码加密方式为经典方式。

  • 命令行连接mysql,修改用户密码的加密方式为mysql_native_password
> mysql -u root -p 

> use mysql; 

> select user, host, plugin, authentication_string from user\G;

> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '你的密码';
  • 重新初始化mysql,使用经典的密码加密方式

Open MySQL from System Preferences > Initialize Database > Choose ‘Use legacy password’ > Start the Server again.


参考文章

https://binary-space.iteye.com/blog/2412769

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值