问题
在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.