1. Questions
The program connection to the database is abnormal, as follows:
Could not create connection to database server. Attempted reconnect 3 times. Giving
2. Solutions
I tried a variety of solutions, and finally realized: MySQL connector- java.jar Inconsistent with the latest database version. The database is the latest version of 8
0.19,mysql-connector- java.jar It’s 5.0.6.
Solution: MySQL connector- java.jar Keep the same version number as the database.
The POM file is as follows, please check and modify the version by yourself; some versions are compatible, but it is better to keep them unified.
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.19</version>
</dependency>
Read More:
- node.js Server MySQL database connection timeout (error: connect etimeout)
- JDBC connect to Sql Server to connect to the database–The TCP/IP connection to the host localhost, port 1433 has failed
- Vscode remote connection server reports an error: could not establish connection to “XXXXXX” [resolved]
- Visual SVN server provider failed to perform the attempted operation 0x80041024 after win7 upgraded win10
- Local can link to the server database, upload jar package to the server will report an error
- MySQL: if the remote connection using navicatip fails, prompt “is not allowed to connect to this MySQL server”
- [TCP] TCP connection SYN timeout retransmission times and timeout period
- The connection pool of SSM project database cannot be connected. The project can run normally and the database cannot be connected
- Solve the database connection failure of Discuz! Database error (1045) notconnect Forum
- PHP connection to MySQL database error: call to undefined function MySQL_ connect()
- Connection error:Cannot connect to redis-server. Details are available in connection log.
- Error in ODBC connection of Dameng database, [ISQL] error: could not SQLConnect
- The problem of MySQL database connection failure errno: 1049 error
- Attempted import error: ‘injectglobal’ is not exported from ‘styled components’
- How to Fix adb_server_notify: ADB server connection failed
- History Metastore Canary failed to create database
- Insert keyframe giving keying set failed to insert any key frames (solved)
- In the XML configuration file of spring jdbc.properties The connection to the database failed due to garbled code
- MySQL Workbench: Error Code: 2013. Lost connection to MySQL server during query solution
- PHP under linux uses pdo-dblib to connect to mssql to report an error solution. Error message: SQLSTATE[01002] Adaptive Server connection failed (severity 9)