‘caching_sha2_password‘ cannot be loaded问题解决
创建mysql连接时突然报这样的错

1.使用快捷键:win+R,cmd 打开小黑框连接到本地mysql并输入以下几条命令
// An highlighted block
> `进入mysql `:mysql -u root -p
> use mysql;
> select user,plugin from user where user='root';
> alter user 'root'@'localhost' identified with mysql_native_password by '密码';
> flush privileges;

2.完成以上操作后,再打开Navicat试一次,连接成功!

本文介绍了解决在创建MySQL连接时遇到的‘caching_sha2_password’加载失败的问题的方法。通过在命令行中执行一系列命令来更改root用户的认证插件,最终实现通过Navicat成功连接MySQL。
1万+





