连接数据库时候报错:com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure。
我的数据库是centos7 docker安装的mysql5.7
这个错误解决是地址改为:
url: jdbc:mysql://ip:3310/mysql?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
在地址后面加useSSL=false&serverTimezone=GMT%2B8