连接MySql报错Unable to load authentication plugin 'caching_sha2_password'。
连接MySql报错Unable to load authentication plugin 'caching_sha2_password'.。
原因是由于mysql8 默认为caching_sha2_password,而原先为mysql_native_password。
解决方案:
在MySQL中执行
ALTER USER 'root'@'localhost' IDENTIFIED BY '密码' PASSWORD EXPIRE NEVER;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '密码';
FLUSH PRIVILEGES;