用过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的更多相关文章

  1. 解决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 ...

  2. 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 ...

  3. 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 ...

  4. 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 ...

  5. 【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 ...

  6. 异常: 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. ...

  7. 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 ...

  8. 解决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 ...

  9. 【问题解决:时区】连接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 ...

  10. 解决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 ...

随机推荐

  1. HDFS之HA

    HDFS高可用环境HA的架构 HDFS组件由一个对外提供服务的namenode(存储元数据)和N个datanode组成:Zookeeper有三个作用:1.为了统一配置文件 config 2.多个节点的 ...

  2. SecureCRT通过密钥登录(网上也有很多教程,但是有些不详细,此教程本人亲测)

    1.先打开SecureCRT,标题标--工具---创建公钥,如图: 2.点击创建公钥,弹出选项点下一步 3.继续点下一步: 4.继续点下一步: 5.继续点下一步(密钥长度默认1024即可),生成密钥需 ...

  3. java多线程之AtomicLong与LongAdder

    AtomicLong简要介绍 AtomicLong是作用是对长整形进行原子操作,显而易见,在java1.8中新加入了一个新的原子类LongAdder,该类也可以保证Long类型操作的原子性,相对于At ...

  4. delphi 的一些注意点和知识点

    关于Delphi中产生的文件    编辑阶段: pas/单元文件,dpk/组件包文件,dpr/工程文件,dfm/窗体文件    编译阶段: dcu/单元编译文件,dcp/Delphi Compile ...

  5. 20175208 张家华 MyOD

    一.实现目的: 编写MyOD.java 用java MyOD XXX实现Linux下od -tx -tc XXX的功能 二.功能简介 1.Linux下的od功能是将指定文件内容以八进制.十进制.十六进 ...

  6. 20175208 实验二 《Java面向对象程序设计》实验报告

    一.实验报告封面 课程:Java程序设计  班级:1752班  姓名:张家华  学号:20175208 指导教师:娄嘉鹏  实验日期:2019年4月09日~2019年4月18日 实验序号:实验二 实验 ...

  7. CCF CSP 201809-1 卖菜

    题目链接:http://118.190.20.162/view.page?gpid=T79 问题描述 试题编号: 201809-1 试题名称: 卖菜 时间限制: 1.0s 内存限制: 256.0MB ...

  8. CCF CSP 201409-1 相邻数对

    题目链接:http://118.190.20.162/view.page?gpid=T16 问题描述 试题编号: 201409-1 试题名称: 相邻数对 时间限制: 1.0s 内存限制: 256.0M ...

  9. 什么是DevOps

    历史回顾 为了能够更好的理解什么是DevOps,我们很有必要对当时还只有程序员(此前还没有派生出开发者,前台工程师,后台工程师之类)这个称号存在的历史进行一下回顾. 如编程之道中所言: 老一辈的程序员 ...

  10. DUILIB UI创建过程

    函数调用过程: CDialogBuilder 内部过程循环创建控件树 上图中 在AttachDialog中设置窗口的主控件  并设置控件树的pm