问题: Navicat for MySQL连接MySQL 8数据库失败
标题问题: Navicat for MySQL连接MySQL 8数据库失败:**
一、错误现象:
错误描述:
2509-Authentication plugin ‘caching_sha2_password’ cannot be loaded
错误原因:
MySQL 8采用了新的身份验证插件caching_sha2_password登录,而之前的版本采用mysql_native_password模式登录。
解决方法:
把当前的登录模式更改为mysql_native_password
二、 具体方法
- 打开MySQL 8.0 Command Line Client,输入登录密码:
- 把准备用Navicat Premium 12登录的用户的模式改为mysql_native_password:
alter user ‘用户名’@‘主机名’ identified with mysql_native_password by ‘密码’;
把用户名,主机名,和密码换成你自己的就可以了,例如
alter user ‘root’@‘localhost’ identified with mysql_native_password by ‘abc123’;
3.重新用Navicat Premium 12登录即可成功。