SQLyog错误号码MySQL plugin caching_sha2_password could not be loaded的解决方法
问题描述:
SQLyog错误号码 plugin caching_sha2_password could not be loaded
原因分析: MySQL新版默认使用caching_sha2_password作为身份验证插件,而旧版是使用mysql_native_password
当连接MySQL时报错“plugin caching_sha2_password could not be loaded”时,可换回旧版插件。
解决方案: 远程命令行登录mysql
mysql -hlocalhost -uroot -proot -P3306

操作mysql数据库命令:
use mysql;
查看用户名使用的身份验证插件:
mysql> select Host,User,plugin from mysql.user;
修改root用户的身份验证插件
本地连接:
alter user root@localhost identified with mysql_native_password by '123456'; FLUSH PRIVILEGES;
远程连接:
alter user root@'%' identified with mysql_native_password by '123456'; FLUSH PRIVILEGES;

4.最后成功

远程连接MYSQL错误“PLUGIN CACHING_SHA2_PASSWORD COULD NOT BE LOADED”的解决办法
1、 进入MYSQL依次执行如下命令
# 本地mysql # 修改加密规则(非必须) alter user 'root'@'localhost' identified by '123456' password expire never; # 更新用户的密码 alter user 'root'@'localhost' identified with mysql_native_password by '123456'; # 刷新权限 flush privileges; # 重置密码(==非必须==) alter user 'root'@'localhost' identified by '123456'; # 远程mysql(linux,docker中) # 如果你需要使用远程登录,将localhost 改为 %,下面的‘123456'使用你自己的密码 # 修改加密规则(非必须) alter user 'root'@'%' identified by '123456' password expire never; # 更新用户的密码 alter user 'root'@'%' identified with mysql_native_password by '123456'; # 刷新权限 flush privileges; # 重置密码(==非必须==) alter user 'root'@'%' identified by '123456';
其中123456换成自己的密码。
2、查看修改结果
SELECT Host, User, plugin from mysql.user;

到此这篇关于SQLyog错误号码MySQL plugin caching_sha2_password could not be loaded的文章就介绍到这了,更多相关MySQL caching_sha2_password could not be loaded内容请搜索脚本之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持脚本之家!
相关文章
Window10下mysql 5.7.21 安装配置方法图文教程
这篇文章主要为大家详细介绍了Window10下mysql 5.7.21 安装配置方法图文教程,具有一定的参考价值,感兴趣的小伙伴们可以参考一下2018-09-09
MySQL中参数sql_safe_updates在生产环境的使用详解
这篇文章主要给大家介绍了关于MySQL中参数sql_safe_updates在生产环境使用的相关资料,并给大家分享了解决mysql sql_safe_updates不支持子查询更新的方法,分享出来供大家参考学习,需要的朋友们下面来一起看看吧。2017-11-11


最新评论