Sequel Pro 客户端连接 MySQL 失败

问题

安装完毕 MySQL,启动 MySQL后,Sequel Pro 连接 MySQL 失败。
账号密码都是正确的,却一直连接不上!!

报错如下:

Unable to connect to host 127.0.0.1, or the request timed out.

Be sure that the address is correct and that you have the necessary privileges, or try increasing the connection timeout (currently 10 seconds).

MySQL said: Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/lib/plugin/caching_sha2_password.so, 2): image not found

解决

原来是安装 MySQL 时,只设置了 Use Strong Password Encryption 密码。


Use Legacy Password Encryption

两者的区别,如截图上说的:
使用 Use Strong Password Encryption 非当前连接者&客户端可能无法连接

使用 Use Legacy Password Encryption 设置一个新密码(与Use Strong Password Encryption不能相同),作为客户端连接时的密码。


使用 Use Legacy Password Encryption 设置一个新密码

然后,重启 MySQL服务,使用客户端连接,注意使用 Legacy Password 。

连接成功

当设置完成Legacy Password 后,若在客户端再次使用 Strong Password 连接,会提示没有权限。


再次使用 Strong Password 连接

友情提示

Mac 设置 Legacy Password 的界面,在这里找。

打开系统偏好设置

MySQL配置界面

打开MySQL,点击 Initialize Database 按钮,即可进入设置页面

Initialize Database

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容