This article is a mirror article of machine translation, please click here to jump to the original article.

View: 12168|Reply: 0

[Source] MYSQL:WARN: Establishing SSL connection without server's identity verificatio...

[Copy link]
Posted on 8/16/2018 4:03:54 PM | | | |
The following warning message appears when JDBC connects to Mysql database:

Thu Aug 16 16:01:11 CST 2018 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 connection issue for Mysql database, warning that it is not recommended to use SSL connection without server authentication, this problem is only available in MYSQL 5.5.45+, 5.6.26+ and 5.7.6+ versions. The workaround is already stated in the warning:

1. Add useSSL=false to the URL of the database connection;
2. Add useSSL=true to the url and provide the server's authentication certificate.
If you just do a test, there is no need to get a certificate, just add a useSSL=false after connecting, for example:

When using Java to connect to JDBC, you can set the value of useSSL to false in the Properties object, but it is the same as writing in the link. Like what

In fact, this doesn't need to be written, but a colleague is lazy, he doesn't know how to read the warning message, so he asked me directly, written for lazy people, haha





Previous:Multi-line comment and uncomment shortcuts in IDEA
Next:C# Distinct conditionally deduplicates objects
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com