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.
解决办法:配置文件加上&useSSL=false
spring:
datasource:
username: root
password: rendudata
url: jdbc:mysql://127.0.0.1:3306/consulting_session_db?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8
driver-class-name: com.mysql.cj.jdbc.Driver
文章来源地址https://www.toymoban.com/news/detail-561896.html
文章来源:https://www.toymoban.com/news/detail-561896.html
到了这里,关于连接mysql数据库报错com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure的解决方法的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!