com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure 报错
这个错,会一直往下报错,找了半天百度,终于在自己的小黄鸭排错找到了问题所在
去yml看看
#spring的配置
spring:
application:
name: springcloud-provider-dept
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://lcoalhost:3306/db01?&useSSL=false&serverTimezone=UTC&useUniCode=true&characterEncoding=UTF-8
username: root
password: root
仔细看Url里面配置的,细心的可能发现了,都是粗心大意造成的
改过来,运行成功!!!