navicat客户端能链接,代码后台连不上数据库问题
navicat客户端能链接,代码后台连不上数据库问题
·
启动报错:
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received
No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
Exception in thread "main" com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
解决:
连接池url的设置问题,加上:
?useUnicode=true
而且
useSSL=false 要设置成false
更多推荐



所有评论(0)