MySQL 5的优点:
MySQL 5的缺点:
MySQL 8的优点:
MySQL 8的缺点:
注意查看日期里面是否是双引号
UPDATE tablename
SET ziduanming= ADDTIME(
date("2022-02-26") + INTERVAL 0 HOUR,
time(ziduanming)
)
博客地址:Mysql8.0的URL配置
1、url: jdbc:mysql://localhost:3306/yinliu?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&rewriteBatchedStatements=true
2、driver: com.mysql.cj.jdbc.Driver
3: mysql jar包也要引入高版本的
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.11</version>
</dependency>
配置格式
注意下面的CJ.
datasource.connection.driver_class=com.mysql.cj.jdbc.Driver
datasource.connection.url=jdbc:mysql://localhost:3308/db_yiqing_manage_system?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&rewriteBatchedStatements=true
datasource.connection.username=root
datasource.connection.password=root
datasource.connection.driver_class=com.mysql.jdbc.Driver
datasource.connection.url=jdbc:mysql://localhost:3306/db_name?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8
datasource.connection.username=root
datasource.connection.password=