启动项目没有报错,调用查询sql语句出现问题
启动项目没有报错,调用查询sql语句出现问题
问题截图:
问题描述:
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.] with root cause
javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
问题分析:
由描述可知,数据发送成功给mysql服务,但是没有得到任何信息。那么说明服务是存在的,但是无法知道返回的信息。信息没有得到,通信存在问题,很大概率在通信协议上。再看到SSL和protocol这写关键字,猜测应该是在url配置通信参数是存在问题。
问题处理:
可参考如下文章解决:MySQL连接报错No appropriate protocol (protocol is disabled or cipher suites are inappropriate)-CSDN博客