Sat Jul 18 09:07:06 CST 2020 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.
仔细看报警信息,如果看不懂可以使用翻译软件翻译:
WARN
不建议在没有服务器身份验证的情况下建立SSL连接。根据MySQL 5.5.45+, 5.6.26+和5.7.6+的要求,如果没有设置显式选项,默认情况下必须建立SSL连接。您需要通过设置useSSL=false显式禁用SSL,或者设置useSSL=true并为服务器证书验证提供信任存储。
通过阅读WARN信息会发现,连接高版本的Mysql时需要显示声明 useSSL设置。
解决方案:
在mysql连接字符串url中加入useSSL=true或者false即可:
url: jdbc:mysql://127.0.0.1:3306/seckill?useSSL=true&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&?zeroDateTimeBehavior=convertToNull