用过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. 一HTML基础知识

    网站(前段项目)的目录结构及命名 网站的结构:网站是存放在服务器上的一个文件夹(根目录),是网站所有文件的集合.网站中所有文件按照文件类型或功能分门别类的整理存放. 网站命名规则:网站中的所有文件命名 ...

  2. VisualVM监控远程服务器JVM

    VisualVM是JDK自带的一款全能型性能监控和故障分析工具,包括对CPU使用.JVM堆内存消耗.线程.类加载的实时监控,内存dump文件分析,垃圾回收运行情况的可视化分析等,对故障排查和性能调优很 ...

  3. 接口自动化框架(java)--1.项目概述

    项目github地址: https://github.com/tianchiTester/API_AutoFramework 这套框架的报告是自己封装的 1.测试基类TestBase: 接口请求的te ...

  4. HTMLTESTRunner自动化测试报告增加截图功能

    我们都知道HTMLTESTRunner自动化测试报告,是Unittest单元测试框架报告,那么在做ui测试的时候就有点不适用了. 我们需要出错截图功能. 以下是我改的,增加了截图功能,先展示界面,再展 ...

  5. thrift常见异常及原因分析(updating)

    [org.apache.thrift.TException家族] [Thrift架构] 以下是thrift的客户端和服务端交互的一个原理图.可以看到遵循了rpc框架的传输层.协议层和应用层三层.本文提 ...

  6. 宏开发:excel中添加拼接行

    Sub 万途标签()Dim iFor i = 1 To Sheets.Count    If Sheets(i).Name = "数据表" Then        If MsgBo ...

  7. openwrt路由器进入安全模式

    openwrt路由器型号:WNDR3800 一.实验背景 在pc机上通过xshell软件登录openwrt路由器,pc机通过网线与openwrt路由器的LAN接口相连.openwrt路由器自带两块无线 ...

  8. djanggo中自定义过滤器的步骤图解

  9. IT题库3-线程实现的方式

    1.继承Thread类创建线程 Thread类本质上是实现了Runnable接口的一个实例,代表一个线程的实例.启动线程的唯一方法就是通过Thread类的start()实例方法.start()方法是一 ...

  10. IP通信基础学习第九周

    H3C单臂路由: 交换机的所有接口是在同一个广播域 用vlan进行隔离广播域 创建vlan,display可查看是否创建成功 进入接口是Interface,配置接口Port 先测试相同的vlan ,可 ...