问题处理—— WARN: Establishing SSL connection without server's identity verification is not recommended.

错误信息截图

错误信息

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.

错误信息翻译

警告:不进行服务器身份验证就建立SSL连接是不推荐的。

根据MySQL 5.5.45+,5.6.26+与5.7.6+的要求,如果没有进行显式设置,SSL连接默认必须被建立。

为了服从没有使用SSL的已存在应用,服务器验证证书的属性设置为'false'。

你可以选择通过设置useSSL=false显式禁止SSL,或设置useSSL=true并且为服务器证书确认提供信任存储库。

错误处理

url中添加useSSL=false

  <property name="DB.URL" value="jdbc:mysql://${DB.HOST}:${DB.PORT}/${DB.SID}?allowMultiQueries=true"/>
  <property name="DB.URL" value="jdbc:mysql://${DB.HOST}:${DB.PORT}/${DB.SID}?allowMultiQueries=true&amp;useSSL=false"/>

note:第一个配置为报错的url,第二个为修正后的url。

扫描二维码关注公众号,回复: 3476262 查看本文章

note:由于是xml配置,所以使用&amp;表示&,如果url配置文件不为xml,可以直接使用&。

猜你喜欢

转载自blog.csdn.net/qq_32165041/article/details/82790396
今日推荐