This warning message is always present when using MySQL
Warning message: warn:establishing SSL connection without server ' s identity verification is not recommended.
The reason for this warning is:
MySQL in the high version needs to indicate whether to make an SSL connection.
For example, my MySQL version is 5.7, if it is 5.5, there will be no such problem.
How do I resolve this warning message?
For example, my MySQL configuration is this:
Validationquery=select 1jdbc_url=jdbc:mysql://localhost:3306/testjdbc_username= Rootjdbc_password=1234
Change it to
Validationquery=select 1jdbc_url=jdbc:mysql://localhost:3306/test?useunicode=true& Characterencoding=utf8&usessl=falsejdbc_username=rootjdbc_password=1234
The main is to change the UseSSL to false.
About Validationquery, here's a little bit.
DBCP for different databases Validationquery
When you use the DBCP connection pool, you can test whether the connection is available by setting the Testonborrow and Testonreturn properties. Unfortunately, you also need to set validationquery to work. So here's the question. How do I set the Validationquery value?
What is Validationquery?
Validationquery is a query statement used to validate a database connection, which must be a SELECT statement that returns at least one data. Each database has its own validation statements, and the following table collects the validationquery of several common databases.
Druid connection pooling can also be used in this way. Remember, when I first touch this, is when using MyBatis Plus, otherwise normal if the driver of MySQL will not select 1 this writing, but
Write this:
validationquery=com.mysql.jdbc.Driverjdbc_url=jdbc:mysql://localhost:3306/test? Useunicode=true&characterencoding=utf8&usessl=falsejdbc_username=rootjdbc_password=1234
Warning questions about the SSM framework using the MySQL console