springboot2.0+连接docker 的mysql镜像 jdbc的问题

连接成功的方式

   application.yml文件  

spring:
  datasource:
    username: root
    password: [password]
    url: jdbc:mysql://[ip]:3306/jdbc01
    driver-class-name: com.mysql.cj.jdbc.Driver

设置连接编码 

url: jdbc:mysql://[ip]:3306/jdbc01?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8

问题一:

Spring Boot java.sql.SQLException: Access denied for user ''@'192.168.220.1' (using password: NO)

博主:https://blog.csdn.net/qq_42222764/article/details/96630929

问题二:

 Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.

博主:https://blog.csdn.net/qq_42969074/article/details/84568778

你可能感兴趣的:(spring采坑日记)