mysql5.6连接遇到的问题
来源:互联网 发布:郑和 知乎 编辑:程序博客网 时间:2024/05/18 20:12
maven项目 springcloud的demospring-mybatis整合 mysql数据库5.6
1. Caused by: java.lang.IllegalStateException: Cannot load driver class: org.gjt.mm.mysql.Driver
改为 com.mysql.jdbc.Driver后,出现如下提示:
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
最终改为: com.mysql.cj.jdbc.Driver
2. Caused by: com.mysql.cj.core.exceptions.InvalidConnectionAttributeException: The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
在数据库连接的url后加上 ?serverTimezone=UTC
示例: application.yml中关于数据源配置
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/db8001?serverTimezone=UTC
username: root
password: 123456
- mysql5.6连接遇到的问题
- 安装mysql5.6遇到的问题
- 数据库升级到mysql5.6遇到的数据表ENGINE问题
- mysql5.1.58安装遇到的问题
- mysql5.5 遇到的路径问题
- 安装mysql5.7.11遇到的问题
- 安装绿色版mysql5.7.13遇到的问题
- Mysql5.7.15安装遇到的问题
- mysql5.7.18安装时遇到的问题
- c++连接mysql5.6出错问题记录
- ssh连接遇到的问题
- 连接数据库遇到的问题
- 远程桌面连接遇到的问题
- MySQL5.7 连接池的连接timeout问题
- mysql5.7项目不能连接的问题。项目不能连接
- mysql5.7.20的安装以及遇到的问题(一)
- mysql5.7.20的安装以及遇到的问题(二)
- mysql5.7.20的安装以及遇到的问题(四)
- mysql 取差集和取交集
- CF758E:Broken Tree(DFS & 思维)
- linux work 2 -vi
- Android开发 之 viewGroup视图动画
- kubernetes1.7新特:kubectl支撑中文字符集
- mysql5.6连接遇到的问题
- linux /sys目录下各个子目录的具体说明
- 最短路径问题
- StringUtils.join的用法:
- CSS基础语法
- MFC定时器SetTimer
- PCI Geomatica v9.1完整好用\
- 树的直径
- C++字符集和词法记号