Navicat Premium 连接MySQL数据库出现Authentication plugin 'caching_sha2_password' cannot be loaded的解决方案
安装MySQL8.0后,使用Navicat Premium连接MySQL报错,提示“Authentication plugin 'caching_sha2_password' cannot be loaded xxxx”,使用以下方法可以解决:
- 使用管理员身份打开“MySQL8.0 Command Line Client”,如下图:
- 输入root账号的密码登录系统;
- 修改账户密码加密规则并更新用户密码,
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
- 刷新权限并重置密码,
FLUSH PRIVILEGES;
alter user 'root'@'localhost' identified by '123456';
- 再次打开Navicat Premium,连接MySQL成功;