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 密码。


2849271-aeb020081a61d1f5.png
Use Legacy Password Encryption

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

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


2849271-97bd8f9c1645ef78.png
使用 Use Legacy Password Encryption 设置一个新密码

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

2849271-ec705c946d4dac41.png
连接成功

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


2849271-58aa5e3921e670e3.png
再次使用 Strong Password 连接

友情提示

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

打开系统偏好设置

2849271-9406b64a9e37f079.png
MySQL配置界面

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

扫描二维码关注公众号,回复: 5233741 查看本文章
2849271-ef8d608e3f2f85f3.png
Initialize Database

猜你喜欢

转载自blog.csdn.net/weixin_33682790/article/details/86879157