当前位置: 移动技术网 > IT编程>数据库>Mysql > 使用Mybatis连接到Mysql报错,WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.2

使用Mybatis连接到Mysql报错,WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.2

2019年03月03日  | 移动技术网IT编程  | 我要评论

在eclipse中使用springboot整合mybatis,连接到5.7版本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.

修改数据库连接配置 application.properties

加上usessl=false或者&usessl=true即可

如:

spring.datasource.url = jdbc:mysql://localhost:3306/test1?useunicode=true&characterencoding=utf-8&usessl=false

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网