jdbc连接mysql5与mysql6的区别

1,JDBC连接Mysql5:

driverClassName=com.mysql.jdbc.Driver

url=jdbc:mysql://localhost:3306/test?

username=root

password=

2,JDBC连接Mysql6:

driverClassName=com.mysql.cj.jdbc.Driver

url=jdbc:mysql://localhost:3306/test?serverTimezone=UTC

username=root

password=

3,SpringBoot连接MySql的application.properties配置:

spring.datasource.driverClassName=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/test?
spring.datasource.username=root
spring.datasource.password=


spring.jpa.database=MYSQL


spring.jpa.hibernate.ddl-auto=update


spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy


spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect


spring.jpa.show-sql=true

你可能感兴趣的:(jdbc连接mysql5与mysql6的区别)