Starting the project today suddenly throws the following error message:
[16:14:32.735][ERROR][com.alibaba.druid.pool.DruidDataSource][main] init datasource error, url: jdbc:mysql://localhost:3306/test
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
Checking the information and finally came to the conclusion: MySQL needs to specify whether to make an SSL connection in the high version
Set useSSL=false
and change the connection URL as follows
jdbc:mysql://localhost:3306/test?useSSL=false