Solutions to database connection problems: “connections could not be acquired from the underlying database!”
1. When learning spring security, use the correct account and password to log in successfully. When viewing user management, an error is reported
2. After various searches, I found that none of them could solve my problem
3. Later, I compared the data of “database connection pool” between projects
The problem is solved by replacing “usessl = true” in JDBC URL with “usessl = false”
database.properties
1 driverClass=com.mysql.jdbc.Driver 2 jdbcUrl=jdbc:mysql://localhost:3306/ssm_order?useSSL=false&useUnicode=true&characterEncoding=utf8 3 user=root 4 password=111111
4. Summarize the difference between usessl = false or true:
SSL protocol provides services mainly:
1) authenticate the user server to ensure that the data is sent to the correct server; .
2) encrypt data to prevent it from being stolen and used during data transmission
3) maintain data integrity and verify whether data is lost during transmission
currently, two layers of SSL protocol are supported:
SSL record protocol: the establishment relies on the transmission protocol (TCP) high-level protocol to provide basic functions such as data encapsulation, compression and encryption. Support
SSL handshake protocol: the establishment of SSL record protocol is used for identity authentication, negotiation of encryption algorithm and Exchange encryption keys, etc
When connecting with MySQL, the higher version of MySQL needs to indicate whether to connect with SSL.
It is not recommended to establish an SSL connection without server authentication, and the explicit option must be set, because the versions after mysql5.7 default usessl = true, so you need to explicitly disable SSL by setting usessl = false;
Or set usessl = true and provide a trust store for server certificate validation.
Reference article: https://blog.csdn.net/qq_ 45151059/article/details/114297848
Similar Posts:
- [Solved] Springboot Project Connect MYSQL Error: Establishing SSL connection without server’s identity verification is not recommended.
- For the problem of establishing SSL connection in mysql, set usessl = false to explicitly disable SSL, or set usessl = true
- [Solved] ER_NOT_SUPPORTED_AUTH_Mode node connection database error
- WARN: Establishing SSL connection without server’s identity verification is not recommended.
- Logstash output jdbc Error: java.lang.IllegalAccessError: tried to access class com.mysql.jdbc.EscapeProcessor from class com.mysql.jdbc.ConnectionImpl
- [Solved] Deploying Tomcat connection in Linux Navicat reports error 2059 – authentication plugin ‘caching_sha2_Password ‘cannot be loaded: + Xi input 9 g
- [Solved] Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
- [Solved] spark Connect hive Error: javax.jdo.JDODataStoreException: Required table missing : “`DBS`” in Catalog “” Schema “”
- SSM Project Error: java.sql.SQLException: Access denied for user ‘????…§’@’localhost’ (…
- [Solved] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.6…