异常如下:
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
做了个demo项目运行dockerfile打包镜像容器并运行抛出了如上异常
本地可以连接项目并启动
打包镜像和容器运行后 docker logs 容器id时提示如上异常
解决如下:
application.yml数据源配置 注意useSSL=false配置不能丢失
url: jdbc:mysql://192.168.1.10:3306/skywalking_service?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true