init datasource error, url: jdbc: mysql://localhost:3306/test terms of settlement

dadeity 2022-01-26 12:06:20 阅读数:32

init datasource error url jdbc

Problem description

  • Today, the startup project suddenly throws the following error message :
[16:14:32.735][ERROR][][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


  • Check the data and finally draw a conclusion :MySQL In the higher version, you need to indicate if you want to SSL Connect

terms of settlement

  • Set up useSSL=false, Change connection URL as follows
copyright:author[dadeity],Please bring the original link to reprint, thank you.