Navicat连接数据库报错
参考博客:https://blog.csdn.net/GRAY_KEY/article/details/80659916
错误详情 :Authentication plugin'caching_sha2_password'cannot be loaded:...........
解决:
,MySql 8.0.11 换了新的身份验证插件(caching_sha2_password), 原来的身份验证插件为(mysql_native_password)。而客户端工具Navicat Premium12 中找不到新的身份验证插件(caching_sha2_password),对此,我们将mysql用户使用的 登录密码加密规则 还原成 mysql_native_password,即可登陆成功。
使用cmd远程连接数据库,修改身份验证插件
1、use mysql
2、select user,host,plugin,authentication_string from user;
3、alter user 'root'@'%' identified with mysql_native_password by '123456'; (root (账号以实际为主) )
数据库不支持远程访问
1、登录mysql 输入: use mysql;
2、select host from user; (可以发现有一个user表,需要改动)
3、update user set host ='%' where user ='root';
Navicat导入sql文件
将数据库内的数据变成一个sql文件
参考:https://www.php.cn/jishu/mysql/409985.html