Tomcat启动报错:Client does not support authentication protocol requested by server; consider upgrading MySQL client

2021年09月21日 12:15
326 阅读
0 评论
0

这几天接触了tomcat+nginx负载均衡,在大部分工作都完成后,启动tomcat时发现报错:Client does not support authentication protocol requested by server; consider upgrading MySQL client,根据日志提示需要升级mysql,尝试升级后再次启动tomcat时还是会出现此错误。
于是只能借助万能的百度了,根据百度搜索到的解释是因为:mysql8 之前的版本中加密规则是mysql_native_password,而在mysql8之后,加密规则是caching_sha2_password,那接下来要做的就是更改mysql的加密规则了。

管理员连接mysql

alter user 'root'@'localhost' identified with mysql_native_password by 'password';

刷新权限,重启mysql

执行flush privileges;重启mysql服务后启动tomcat后恢复正常
参考文章:《https://blog.csdn.net/lc11535/article/details/99195568?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.control&dist_request_id=&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.control
但可能会出现另一种错误:Access denied for user ‘root’@’localhost’ (using password: NO),该问题解决可见文章《https://cesii.cn/426.html

← 上一篇代码审计工具:CheckMarx安装记录下一篇 →Tomcat启动/Navicat连接时报错:Access denied for user ‘root’@’localhost’ (using password: NO)

评论

评论 (0)

发表评论

😀 😂 😅 😍 😒 😓 😔 😖 😘 😡 😭 😱 😤 😴 😷 😵 😎 👍 👎 👏 🙏 ❤️ 💔 🎉 🎂 🤕 😏 👻