在Mac上一直使用mysequal pro 作为mysql 客户端,当登录MYSQL 8.0时会报错,错误如下:
MySQL said: Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/mysql/lib/plugin/caching_sha2_password.so, 0x0002): tried: '/usr/local/mysql/lib/plugin/caching_sha2_password.so' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/mysql/lib/plugin/caching_sha2_password.so' (no such file), '/usr/local/mysql/lib/plugin/caching_sha2_password.so' (no such
这是由于从mysql 8.0开始默认使用caching_sha2_password作为密码的认证方式,而老旧客户端是没有的,修复方法如下:
修改mysql.cnf将认证方式改回原来的mysql_native_password
[mysqld]
default_authentication_plugin=mysql_native_password
将某个用户设置为mysql_native_password
ALTER USER '[USERNAME]'@'%' \
IDENTIFIED WITH mysql_native_password \
BY '[PASSWORD]';
flush privleges;
本文为Lokie.Wang原创文章,转载无需和我联系,但请注明来自lokie博客http://lokie.wang