[Solved] com.alibaba.druid.pool.DruidDataSource – create connecti

A service deployed in the server docker reported the following error when connecting to the database:

I have searched a lot of information on the Internet, but I can’t solve it by trying various ways,
ERROR com.alibaba.druid.pool.DruidDataSource - create connection SQLException, url: jdbc:mysql://10.10.20.16:3306/acs?&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&serverTimezone=Asia/Kolkata, errorCode 0, state 08S01
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

The specific error information is as follows:

ERROR com.alibaba.druid.pool.DruidDataSource – create connection SQLException, url: jdbc:mysql ://10.10.20.16:3306/acs?& amp; useUnicode=true& characterEncoding=UTF-8& zeroDateTimeBehavior=convertToNull& allowMultiQueries=true& serverTimezone=Asia/Kolkata, errorCode 0, state 08S01
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

Cause of error:

It may be due to the different versions of JDK. This error message is probably caused by the SSL protocol of MySQL

solution: I tried to remove SSLv3 from java.security in jdk-8 on my local machine and restart the service, but I still couldn’t solve it
finally, add this to the MySQL connection string in the service configuration; Usessl = false, that is, disable SSL, problem solved

Read More: