如图所示,navicat12连接mysql8的时候出现这个错误,原因是mysql8之后使用的密码加密方式是caching_sha2_password,navicat无法识别,这时候需要进mysql改加密方式即可。操作如下:
1、进cmd的mysql,输入账号密码登录
2、输入:use mysql
3、输入:select user,plugin from user where user='root';
加密方式为caching_sha2_password。
4、输入:ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';
此处’123456‘为我的密码
5、输入:flush privileges; 进行刷新
6、测试:select user,plugin from user where user='root';
已经改为了传统的加密方式。
连接成功!!