Warning questions about the SSM framework using the MySQL console

Source: Internet
Author: User
Tags connection pooling mysql in mysql version ssl connection

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.