% type -a mysql
mysql is /opt/homebrew/bin/mysql
mysql客户端无法连接
Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/mysql/lib/plugin/caching_sha2_password.so, 2): image not found
Root cause:
-MySQL8.0 default authentication method is: caching_sha2_password
-MySQL5.7 auth. method is mysql_native_password
Update:
Login to mysql using root
$ mysql -u root --skip-password
$ ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'yourpassword';