当前位置:首页 > 编程笔记 > 正文
已解决

mysql驱动包引起的告警问题using SSL the verifyServerCertificate property is set to ‘false‘

来自网友在路上 130830提问 提问时间:2023-11-05 16:16:01阅读次数: 30

最佳答案 问答题库308位专家为你答疑解惑

tomcat启动时报以下ssl的连接错误,mysql版本为5.7.17,虽然系统可以使用,但是日志量太大,还是处理下,只需要修改mysql的连接格式:
url.db= “jdbc:mysql://localhost:3306/disis3?user=root&password=XXXXX&useUnicode=true&characterEncoding=utf-8”
改为:
url.db=“jdbc:mysql://localhost:3306/disis3?user=root&password=XXXXX&useUnicode=true&characterEncoding=utf-8&useSSL=false”
对比原来增加了: &useSSL=false

修改上述连接方式后,替换了mysql8.0的驱动,从mysql官网介绍,mysql8.0的驱动是兼容支持MySQL 5.5, 5.6, 5.7,8.0。

做了以上两个修改之后,重新启动tomcat,tomcat日志打印不再提示以下错误信息
Fri Nov 03 02:16:19 EDT 2023 WARN: Establishing SSL connection without server’s identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn’t set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to ‘false’. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Fri Nov 03 02:16:19 EDT 2023 WARN: Establishing SSL connection without server’s identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn’t set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to ‘false’. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Fri Nov 03 02:22:39 EDT 2023 WARN: Establishing SSL connection without server’s identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn’t set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to ‘false’. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Fri Nov 03 02:22:39 EDT 2023 WARN: Establishing SSL connection without server’s identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn’t set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to ‘false’. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Fri Nov 03 02:22:39 EDT 2023 WARN: Establishing SSL connection without server’s identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn’t set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to ‘false’. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

查看全文

99%的人还看了

猜你感兴趣

版权申明

本文"mysql驱动包引起的告警问题using SSL the verifyServerCertificate property is set to ‘false‘":http://eshow365.cn/6-32811-0.html 内容来自互联网,请自行判断内容的正确性。如有侵权请联系我们,立即删除!