durid连接阿里云mysql失败但不报错

img
初始化成功后立即关闭了连接,主库和从库使用Navicat可以连接,但是用代码durid的连接池没成功

以下是连接配置,用户密码是对的(手动隐藏),密码输错控制台会报错

spring.shardingsphere.datasource.names=m0,s0# user_db主服务器
spring.shardingsphere.datasource.m0.type=com.alibaba.druid.pool.DruidDataSource
spring.shardingsphere.datasource.m0.driver-class-name=com.mysql.cj.jdbc.Driver
spring.shardingsphere.datasource.m0.url=jdbc:mysql://39.105.33.82:3306/ksd-sharding-jdbc?useUnicode=true&characterEncoding=utf8&tinyInt1isBit=false&useSSL=false&serverTimezone=GMT%2b8
spring.shardingsphere.datasource.m0.username=
spring.shardingsphere.datasource.m0.password=

# user_db从服务器
spring.shardingsphere.datasource.s0.type=com.alibaba.druid.pool.DruidDataSource
spring.shardingsphere.datasource.s0.driver-class-name=com.mysql.cj.jdbc.Driver
spring.shardingsphere.datasource.s0.url=jdbc:mysql://49.65.102.52:3306/ksd-sharding-jdbc?useUnicode=true&characterEncoding=utf8&tinyInt1isBit=false&useSSL=false&serverTimezone=GMT%2b8
spring.shardingsphere.datasource.s0.username=
spring.shardingsphere.datasource.s0.password=

# 保持连接活跃
spring.datasource.druid.keep-alive=true
# 配置获取连接等待超时的时间
spring.datasource.druid.max-wait=60000

有没有用过阿里云mysql的,帮忙分析一下啦

你是不是开了springboot热部署呀,关了就没事了,保持Do nothing
img
另外如果你在pom.xml配置了热部署,也要将其注释掉,如含有下面这些依赖,则需要注释掉
img