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
用过Mysql的人都知道,这个时区问题真个磨人的小妖精,哪天一忘记设置了就会出来磨磨你!!!
之前用的解决方法都是在Mysql的配置上添加与时区相关的配置,但是今天看到一篇博客:https://blog.csdn.net/qq_37630354/article/details/82814330
我觉得这可能是个“一劳永逸”的解决办法,便稍作记录
在你的Mysql安装目录下找到一个 my.in的配置文件,然后用notepad++打开它(或者其他的工具)

然后添加以下这句
default-time-zone='+08:00'

保存后重启Mysql,忘了Mysql相关操作命令的可以看这里
重启成功后登陆Mysql并执行这一句: show variables like '%time_zone%';
忘了Window下怎么登陆MySQL的可以点这里
修改成功的话会看到如下的提示

如果没看到的话可能是修改配置文件出错了,或者是没重启成功1
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的更多相关文章
- 解决mysql时区与系统时区不一致问题。异常:The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone.
异常信息:The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone ...
- SpringBoot报错:The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone
解决方法: 在数据库连接url配置后边加&serverTimezone=GMT%2B8 例: jdbc:mysql://127.0.0.1:3306/test改为jdbc:mysql://12 ...
- The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone.
今天用mysql连接数据库时,出现The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than o ...
- MySql数据库时区异常,java.sql.SQLException: The server time zone value '?й???׼ʱ?' is unrecognized or represents more than one time zone.
JDBC访问MySql异常 Exception in thread "main" org.apache.ibatis.exceptions.PersistenceException ...
- 【JDBC】java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone.
在使用阿里的druid 时,报了一个异常java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized ...
- 异常: 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 configurat
异常: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone. ...
- JDBC告警系列(一)The server time zone value 'ÖÐ' is unrecognized or represents more than one time zone.
一.现象 java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents ...
- 解决java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone
使用spring boot整合MySQL时一直报 java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecog ...
- 【问题解决:时区】连接MySQL时错误The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone
问题描述: MySQL升级到8.0.11之后连接数据库报错: Your login attempt was not successful, try again. Reason: Could not g ...
- 解决The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone
Spring Boot JPA 使用Mysql是出现如下错误: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represe ...
随机推荐
- [linux系统]XFS (vda3):Corruption detected.Unmount and run xfs_repair 简单解决办法
今天kvm的centos系统,rm -rf时报错,具体如下: rm: cannot remove ‘log-0/case1/log_net’: Input/output errorrm: cannot ...
- numpy处理时间序列
1. 字符串转成numpy.datetime64格式 import numpy as np #将字符串转换成numpy格式时间 #注意个位前补0,如1月写成01 nd=np.datetime64('2 ...
- 在centos7 上安装Python3
Centos7缺省是python2.7. 现在需要使Python2和python3 共存,所以需要单独安装python3. 但是需要注意的是如果按缺省方式安装,则会替换python为python3.x ...
- 003-单例OR工厂模式
单例模式:DbContextFactory.cs using CZBK.ItcastOA.Model; using System; using System.Collections.Generic; ...
- PHP filter_var 函数用法
先介绍下PHP Filter PHP手册地址:http://php.net/manual/zh/ref.filter.php PHP 过滤器用于对来自非安全来源的数据(比如用户输入)进行验证和过滤. ...
- C# 链表反转
链表反转分这么两种情况, 一种是链表头节点始终前置,那这时候需要传一个头节点特有的标记:(简称:头不转) HEAD->Test1->Test2->Test3->Test4 反转 ...
- CentOS 7 Squid代理服务器反向代理
Squid反向代理 将不同的URL请求分发到后台不同的Web服务器上,通过squid反向代理,可以加速网站的访问速度,同时互联网用户只能看到反向代理服务器的地址,加强网站的访问安全 Squid反向代理 ...
- react16实战总结
实战总结 react实战基础 遇到的一些坑 li里要带key值否则会警告,这个问题在vue中也存在, 考虑到虚拟DOM中diff,所以不要用index作为key值,而要用item. 2.immutab ...
- [ISSUE] [Centos] Centos Start Nginx Show: Failed to start nginx.service:unit not found
CMD Line:systemctl start nginx.serviceFailed to start nginx.service: Unit not found. Solution: 1.vim ...
- idea常用操作大全
1.智能提示忽略大小写 Ctrl+Alt+s打开setting setting-->Editor-->General-->Code Completion 或者直接搜索Code Com ...