MYSQL:WARN:Establishing SSL connection without server's identity verification is not recommended.

The following warning appears in the JDBC database connection:

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. 

Translation: 

Not recommended to establish an SSL connection without server authentication situation. The MySQL5.5.45 +, 5.6.26 + 5.7.6+ requirements and, if no explicit option, the default SSL connection must be established. In order to comply with existing applications do not use SSL, VerifyServerCertificate property to "false". You need to set usessl = false explicitly disable ssl, or set usessl = true trust and provide libraries for server certificate validation.  

SSL is a connection problem Mysql database, prompting a warning not recommended for use with the server is not authenticated SSL connection, in MYSQL5.5.45 +, 5.6.26+ and 5.7.6+ versions have this problem. Solutions have been described in the warning: 

Solution:

1. Add useSSL = false in the url database connection;

Add useSSL = true 2.url, and provides authentication certificate server.

As we usually develop only need to add a useSSL = false to the url after jdbc connection, for example: 

private String dbUrl="jdbc:mysql://localhost:3306/db_jsp?useSSL=false";

So further testing would not be any problem. 

 

Guess you like

Origin blog.csdn.net/qq_37084904/article/details/93377923