问题描述
springboot 在创建mysql连接时一直报错 Unable to load authentication plugin ‘caching_sha2_password’.
处理办法
使用MySQL 8 与MySQL5 有区别
mysql -h 主机名(ip) -u 用户名 -P 端口 -p
ALTER USER 'root'@'%' IDENTIFIED BY 'root1234' PASSWORD EXPIRE NEVER;
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root1234';
FLUSH PRIVILEGES;
alter user 'root'@'%' identified by 'root1234';