springboot连接报 The last packet successfully received from the server was 5 milliseconds ago
原配置:
datasource:
driver-class-name: com.mysql.jdbc.Driver
username: x
password: x
url: jdbc:mysql://xx:3306/ams?serverTimezone=Asia/Shanghai&characterEncoding=utf8&allowMultiQueries=true
type: com.alibaba.druid.pool.DruidDataSource
解决方法:
url属性加上&useSSL=false
url: jdbc:mysql://xx:3306/ams?serverTimezone=Asia/Shanghai&characterEncoding=utf8&allowMultiQueries=true&useSSL=false
如果本身useSSL=false,可以试着改为&useSSL=true