环境:
MacBook Pro 15
jdk8
IntelliJ IDEA
基础Web框架:Spring+SpringMVC+MyBatis+MySQL+Maven
问题:
WARN: Establishing SSL connection without server’s identity verification is not recommended.
…
翻译过来:(要)建立SSL连接 (却)不使用服务器身份验证 (则)是不建议的;(所以)MySQL默认必须建立SSL连接。
解决:
在配置数据库连接的.perperties配置文件(或者pom.xml里配置数据库连接信息的地方)的url配置项增加&useSSL=false。
改前: url=jdbc:mysql://127.0.0.1:3306/db?useUnicode=true&characterEncoding=utf8
改后: url=jdbc:mysql://127.0.0.1:3306/db
?useUnicode=true&characterEncoding=utf8&useSSL=false
TIPS:
MySQL 5.5.45+, 5.6.26+ and 5.7.6+ 需要定义是否是SSL连接。
SSL连接:SSL(Secure Sockets Layer 安全套接层,一种安全传输协议),即SSL连接指是遵循这种安全传输协议的连接方式。
参考:
MySql:Establishing SSL connection without server’s identity verification is not recommended
Establishing SSL connection without server’s identity verification is not recommended的处理