错误提示:Client does not support authentication protocol requested by server; consider upgrading MySQL client

问题出现原因

MySQL8.0与MySQL5.0所采用的加密方式规则不一样,所以导致Navicat打不开。可通过select host, user, authentication_string, plugin from user;查看密码的规则。root用户的加密规则默认的是:caching_sha2_password,所以我们只需要将默认的caching_sha2_password改为mysql_native_password即可。

解决方法

1
2
3
mysql -u root -p,输入密码
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'yourpassword';
FLUSH PRIVILEGES;