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

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.

你可能感兴趣的:(mysql,ssl)