当前位置:网站首页>You must configure either the server or JDBC driver (via the ‘serverTimezone)
You must configure either the server or JDBC driver (via the ‘serverTimezone)
2022-07-28 05:16:00 【jekyhu】
一、错误信息:
用SpringBoot项目用MyBatis连接数据库报错:You must configure either the server or JDBC driver (via the 'serverTimezone)
二、原因:
因为安装mysql的时候时区设置的不正确 mysql默认的是美国的时区。
三、解决办法:
(1)在数据库名后面加上
?&serverTimezone=Asia/Shanghai如下图:

(2)或者在图形化界面 Navicat Premium 中添加语句:
set global time_zone='+8:00';
如图,问题即可解决。
(3)将 MySQL 版本降低,低版本的则不会出现这种问题。
有时间因为创建的是springboot项目,在pom中添加MySQL依赖,并没有设置版本号,因为springboot内部配置过了。它配置的版本号是8.0.13 就是因为MySQL的版本太高了。
边栏推荐
- PC side bug record
- 个人写的一个文件上传工具网站
- ES6 new variable modifiers let and const, new basic data type symbol
- oracle查看锁表语句、解锁方法
- Read the paper -- a CNN RNN framework for clip yield prediction
- MySQL(5)
- 子父线程交互
- 这种动态规划你见过吗——状态机动态规划之股票问题(中)
- PC端-bug记录
- Table image extraction based on traditional intersection method and Tesseract OCR
猜你喜欢

Check box error

JMeter related knowledge sorting

MySQL 默认隔离级别是RR,为什么阿里等大厂会改成RC?

MySQL date and time function, varchar and date are mutually converted

【CVPR2022】Lite Vision Transformer with Enhanced Self-Attention

ES6 new variable modifiers let and const, new basic data type symbol

个人写的一个文件上传工具网站

【ARIXV2204】Neighborhood attention transformer

这种动态规划你见过吗——状态机动态规划之股票问题(中)

【SLAM】LVI-SAM解析——综述
随机推荐
HDU 1914 the stable marriage problem
Reading sdwebimage source code Notes
Interpretation of afnetworking4.0 request principle
Tips for using swiper (1)
FreeRTOS personal notes - task notification
Dell remote control card uses ipmitools to set IPMI
[slam] lvi-sam analysis - Overview
How to send and receive reports through outlook in FastReport VCL?
Interpreting the source code of cfrunloopref
2022 summer practice (first week)
PC side bug record
Dcgan:deep volume general adaptive networks -- paper analysis
11.< tag-动态规划和子序列, 子数组>lt.115. 不同的子序列 + lt. 583. 两个字符串的删除操作 dbc
【CVPR2022 oral】Balanced Multimodal Learning via On-the-fly Gradient Modulation
How about ink cloud?
架构设计思考之一(SSO设计)
阿里怎么用DDD来拆分微服务?
Simulink automatically generates STM32 code details
First acquaintance with C language (1)
Printf function of input and output function in C language