MySQL 8.0 连接 Sequel Pro 出现异常

问题描述

MySQL 8.0 连接 Sequel Pro 出现异常
错题提示:

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/mysql/lib/plugin/caching_sha2_password.so,
2): image not found

这里首先保证你的密码输入是正确的。
在网络上查找了很多相关问题,发现是密码的验证方式的原因。划重点:

/usr/local/mysql/lib/plugin/caching_sha2_password.so

MySQL 8.0 这一系列版本采用了不同于 5.7 的密码验证方式,所以 Sequel Pro 在连接数据库时会出现异常。

解决方法

1.打开系统偏好设置,点击最下面的 MySQL

MySQL 8.0 连接 Sequel Pro 出现异常

2.点击 Initialize Database,重置数据库

MySQL 8.0 连接 Sequel Pro 出现异常

3.选择 Legacy 的密码方式,并输入一个新的简单密码

MySQL 8.0 连接 Sequel Pro 出现异常

4.启动 MySQL ,重新用 Sequel Pro 连接 MySQL 数据库,成功

MySQL 8.0 连接 Sequel Pro 出现异常