一般报错 java.sql.SQLNonTransientConnectionException: CLIENT_PLUGIN_AUTH is required 就是jdbc对应的mysql版本出错
5.0 需要制定版本 不用管最后子版本
<!--mysql--> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.30</version> </dependency>
对应application.yml
spring: datasource: driver-class-name: com.mysql.cj.jdbc.Driver username: root password: 123456 url: jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2b8
6.0
<!--mysql--> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> </dependency>
对应application.yml 要加个 cj