This error was encountered during the test of integrating mybatis with springboot
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet successfully received from the server was 317 milliseconds ago. The last packet sent successfully to the server was 314 milliseconds ago.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_181]
。。。。
followed by a long list of
The solution is to add usessl = false to the connection string
or change usessl = true to use = false
for example
url: jdbc:mysql://localhost:3306/sqmb?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC
end!!
Read More:
- [Solved] Cannot find class: com.mysql.jdbc.Driver
- [Solved] init datasource error, url: jdbc:mysql://localhost:3306/test
- Extracting JDBC tool class: JDBC utils
- [Solved] Tomcat Server Error: java.lang.NullPointerException Csonsole Error ClassNotFoundException: com.mysql.jdbc.Driver
- [Solved] com.highgo.jdbc.util.PSQLException:bad value for long
- [Solved] Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException
- [Solved] Spring Boot Error: org.springframework.jdbc.datasource.embedded.EmbeddedData
- How to Solve JDBC connection error in spring MVC integration
- Java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver [How to Solve]
- [Solved] You must configure either the server or JDBC driver (via the ‘serverTimezone‘ configuration proper
- [Solved] IDEA jdbc Connect Database Error: java.sql.SQLException: Undefined Error
- [Solved] Springboot connect MySQL error: errorcode 0, state 08s01
- JAVA Connect MYSQL Error: Path does not chain with any of the trust anchors
- Java database Druid error: com.alibaba.druid.pool.DruidDataSource error
- [Solved] fragment error: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myapplication/com.example.myapplication.MainActivity}…
- [Solved] org.apache.ibatis.exceptions.PersistenceException: ### Error building SqlSession…
- [Solved] org.thymeleaf.exceptions.TemplateInputException: Error resolving template
- [Solved] ln: failed to create symbolic link ‘/usr/bin/java’: File exists
- Microservice call exceptions: error feign.RetryableException: Read timed out executing POST http://xxx…….
- [Solved] org.thymeleaf.exceptions.TemplateInputException: Error resolving template