当前位置:网站首页>IDEA 配置连接数据库报错 Server returns invalid timezone. Need to set ‘serverTimezone‘ property.
IDEA 配置连接数据库报错 Server returns invalid timezone. Need to set ‘serverTimezone‘ property.
2022-08-05 05:14:00 【运动猿】
IDEA 配置连接数据库报错 Server returns invalid timezone. Need to set ‘serverTimezone’ property.
原因是MySQL驱动中默认时区是UTC,与本地时间(中国)相差八个小时,所以链接不上。
可以用两种方法解决,都是解决时区问题。
1、点开最右侧 Advanced,找到 serverTimezone,在右侧value处填写 GMT,保存即可!(或填写 Asia/Shanghai)
2、也可以在url后添加:?serverTimezone=GMT
3、版本问题:MySQL驱动 8.0.x新版本的需要设置时区,5.1.x 版本的不需要设置时区,可以直接选择5.1.x的版本省掉时区设置(根据需要选择)
都是时区的问题选哪个都可以,并且这几个是很简单的。
还有一个稍微复杂一丢丢的可以看一下这个博客:需要设置好系统环境变量,dos命令设置时区,还需要同步mysql驱动!
边栏推荐
- 【技能】长期更新
- Lecture 4 Backpropagation Essays
- Using pip to install third-party libraries in Pycharm fails to install: "Non-zero exit code (2)" solution
- 【过一下14】自习室的一天
- Lecture 2 Linear Model Linear Model
- 2022杭电多校第一场01
- Multi-threaded query results, add List collection
- RDD和DataFrame和Dataset
- Do you use tomatoes to supervise your peers?Add my study room, come on together
- day12函数进阶作业
猜你喜欢
【过一下 17】pytorch 改写 keras
[Let's pass 14] A day in the study room
第四讲 反向传播随笔
SQL(二) —— join窗口函数视图
Calling Matlab configuration in pycharm: No module named 'matlab.engine'; 'matlab' is not a package
[Go through 7] Notes from the first section of the fully connected neural network video
NodeJs接收上传文件并自定义保存路径
【过一下3】卷积&图像噪音&边缘&纹理
[Go through 9] Convolution
怎么更改el-table-column的边框线
随机推荐
Database experiment five backup and recovery
学习总结week2_3
Opencv中,imag=cv2.cvtColor(imag,cv2.COLOR_BGR2GRAY) 报错:error:!_src.empty() in function ‘cv::cvtColor‘
第四讲 反向传播随笔
What field type of MySQL database table has the largest storage length?
机器学习(一) —— 机器学习基础
鼠标放上去变成销售效果
位运算符与逻辑运算符的区别
序列基础练习题
Distributed and Clustered
Lecture 4 Backpropagation Essays
怎么更改el-table-column的边框线
周末作业-循环练习题(2)
Convert the paper official seal in the form of a photo into an electronic official seal (no need to download ps)
ESP32 485 Illuminance
门徒Disciples体系:致力于成为“DAO世界”中的集大成者。
【过一下4】09-10_经典网络解析
el-table,el-table-column,selection,获取多选选中的数据
CAP+BASE
[Go through 3] Convolution & Image Noise & Edge & Texture