Establishing SSL connection without server identity verification is not recommended

时间:2022-07-25
本文章向大家介绍Establishing SSL connection without server identity verification is not recommended,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。
报错

SpringBoot启动时报错:

Wed Jun 17 10:13:14 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.
解决

在连接串后面加上useSSL=false jdbc:mysql://localhost:3306/test?useSSL=false