Mysql连接池报错

 报错信息如下


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.
	at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174) ~[mysql-connector-java-8.0.15.jar:8.0.15]


解决方案:配置文件mysql连接加上

&useSSL=false

jdbc:mysql://xxx.xxx.xxx.xxx:3306/smartsite?useUnicode=true&allowMultiQueries=true&characterEncoding=utf8&serverTimezone=UTC&useSSL=false

你可能感兴趣的:(Mysql,mysql,数据库,java)