springboot 相关错误总结(2)

I.问题描述: “ Unable to load authentication plugin 'caching_sha2_password'”. 研究了很久发现是因为MySQL的版本问题

原因:MySQL版本问题,由5到8加密方式导致的

5.X版本是:default_authentication_plugin=mysql_native_password

8.x版本就是:default_authentication_plugin=caching_sha2_password

解决办法,登录mysql,将8.x的加密方式更改为5.x的

输入如下代码:(password换成相应密码)

 

ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
FLUSH PRIVILEGES;
alter user 'root'@'localhost' identified by 'password';

改完加密规则成功运行,后来又发现,在改完加密规则之后,就算MySQL驱动jar包仍然是5.1也可以使用:

 

 

II. 问题描述: Unknown system variable 'query_cache_size'

原因:mysql-connector-java依赖版本过低,提高到8.0.11即可

解决办法:

 

springboot 相关错误总结(2)_第1张图片

 

 

你可能感兴趣的:(springboot 相关错误总结(2))