SQLyog连接数据库报错plugin caching_sha2_password could not be loaded

SQLyog连接数据库报错plugin caching_sha2_password could not be loaded

Dth1yR.png

出错原因

MySQL新版默认使用caching_sha2_password作为身份验证插件,而旧版是使用mysql_native_password。
当连接MySQL时报错“plugin caching_sha2_password could not be loaded”时,可换回旧版插件。

解决方案:

  • cmd:进入数据库,mysql -uroot -p
  • 依次执行
    • mysql> alter user 'root'@'localhost' identified by 'yours password' password expire never; # 重置root密码,修改密码加密规则
    • mysql> alter user 'root'@'localhost' identified with mysql_native_password by 'yours password' # 更新用户密码;
    • mysql> flush privileges; # 刷新权限
  • 然后再次连接SQLyog即可成功访问
-------------本文结束感谢您的阅读-------------
云澈 wechat
扫一扫,用手机访问哦
坚持原创技术分享,您的支持将鼓励我继续创作!
0%