问题描述:基于eclipse练习mybatis时,提示mysql Client does not support authentication protocol requested by server; consider upgrading MySQL
mybatis连接mysql8.0
搜了很多方法,终于找到一个能用的了,解决方案如下:
先登录
mysql -u root -p
###输入你的密码
随后输入
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '你想改成的密码';
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '你想改成的密码';
SELECT plugin FROM mysql.user WHERE User = 'root';
即可!
参考博客: