连接mysql数据库时Establishing SSL connection without server's identity verification is not recommended.
2017-08-03 08:01
579 查看
[Thu Aug 03 08:00:35 CST 2017 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.]
根据上面warn: 设置SSL=true就行了,具体如下 :在url后面加上useSSL=true就行了,
URL="jdbc:mysql://localhost:3306/ssm?useSSL=true"
注意的是,如果但用的jar包高于数据库的版本过不了。
此处使用的mysql-connector为
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.42</version>
</dependency>
数据库的版本为:5.7.17-log
查询mysql的版本号可使用:
SELECT VERSION();
mysql的驱动可在maven仓库中找:
https://mvnrepository.com/artifact/mysql/mysql-connector-java
用的时候注意版本就行了
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.]
根据上面warn: 设置SSL=true就行了,具体如下 :在url后面加上useSSL=true就行了,
URL="jdbc:mysql://localhost:3306/ssm?useSSL=true"
注意的是,如果但用的jar包高于数据库的版本过不了。
此处使用的mysql-connector为
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.42</version>
</dependency>
数据库的版本为:5.7.17-log
查询mysql的版本号可使用:
SELECT VERSION();
mysql的驱动可在maven仓库中找:
https://mvnrepository.com/artifact/mysql/mysql-connector-java
用的时候注意版本就行了
相关文章推荐
- Java连接MySql数据库警告:Establishing SSL connection without server's identity verification is not recommend
- [Mysql] 数据库连接:Establishing SSL connection without server's identity verification is not recommended.
- Java 连接mysql数据库warn:Establishing SSL connection without server's identity verification is not ...
- 连接mysql出现警告:Establishing SSL connection without server's identity verification is not recommended
- 解决mysql数据库问题:Establishing SSL connection without server's identity verification is not recommended.
- Java连接Mysql数据库警告:Establishing SSL connection without server's identity verification is not recommend
- JDBC链接警告WARN: Establishing SSL connection without server's identity verification is not recommended.
- MySql:Establishing SSL connection without server's identity verification is not recommended
- MYSQL Establishing SSL connection without server's identity verification is not recommended.
- Establishing SSL connection without server's identity verification is not recommended
- WARN: Establishing SSL connection without server's identity verification is not recommended. Accordi
- WARN: Establishing SSL connection without server's identity verification is not recommended. Accordi
- WARN: Establishing SSL connection without server's identity verification is not recommended. Accordi
- WARN: Establishing SSL connection without server's identity verification is not recommended.
- MySQL 警告WARN: Establishing SSL connection without server's identity verification is not recommended.
- JDBC:Establishing SSL connection without server's identity verification is not recommended
- Establishing SSL connection without server's identity verification is not recommended的处理
- WARN: EstablishingSSL connection without server's identity verification is not recommended
- Mysql连接时警告提示【WARN: Establishing SSL connection without server's identity verification is not recomm】
- MySQL警告:Establishing SSL connection without server's identity verification is not recommended. Accor