Establishing SSL connection without server's identity verification is not recom

spring boot 使用mysql数据库,启动的时候发现日志中有

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连接来访问数据库.

解决办法:

在jdbc url中加入useSSL参数(参数值可以为false,也可以为true),如下所示:

jdbc:mysql://localhost:3306/jsp_db?useSSL=false

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