用sqlyog 连 mysql 8 时,报错:plugin caching_sha2_password could not be loaded

原因是mysql8 的加密方法变了。

mysql8 开始默认采用caching_sha2_password的加密方式

第三方客户端基本都不支持这种加密方式,只有自带的命令行支持

所以需要修改加密方式,换成老的 mysql_native_password 方式:

ALTER USER 'root'@'localhost' IDENTIFIED BY 'xxxx' PASSWORD EXPIRE NEVER;
 
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'xxxx';
 
FLUSH PRIVILEGES;
原文地址:https://www.cnblogs.com/xubao/p/14029675.html