mysql8.0 使用navicat报caching_sha2_password' cannot be loaded解决方法

发布时间 2023-05-05 17:15:49作者: 宇小白
安装 8.0版本的mysql后,使用navicat连接时,报caching_sha2_password' cannot be loaded的异常。
原因为:8.0版本的mysq用户密码加密方式为caching_sha2_password,navicat暂不支持,需要修改下mysql的加密方式。
解决过程:
#(不建议用root进行连接)
#1
.登陆mysql mysql -u root -p #2.查看当前加密方式 use mysql; select user,plugin from user where user='root'; #可以看到,root账号密码加密方式为caching_sha2_password。 #3.修改加密方式 alter user 'root'@'%' identified with mysql_native_password by 'password'; #4.刷新权限表,使设置生效 flush privileges;