错误提示:

The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone

完整的错误提示:

There was an unexpected error (type=Internal Server Error, status=500).
nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: 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 property) to use a more specifc time zone value if you want to utilize time zone support. ### The error may exist in file [D:\XXXX\Dev\Java\SSM\MONTH_1901\springboot-manage-master\target\classes\mapper\UserMapper.xml] ### The error may involve com.shop_manager.mapper.UserMapper.selectByNameAndPwd ### The error occurred while executing a query ### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: 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 property) to use a more specifc time zone value if you want to utilize time zone support.
 
解决办法:

cmd下输入如下命令进行操作

Normal
0

7.8 磅
0
2

false
false
false

EN-US
ZH-CN
X-NONE

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:等线;
mso-ascii-font-family:等线;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:等线;
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:等线;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;}

Normal
0

7.8 磅
0
2

false
false
false

EN-US
ZH-CN
X-NONE

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.5pt;
mso-bidi-font-size:11.0pt;
font-family:等线;
mso-ascii-font-family:等线;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:等线;
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:等线;
mso-hansi-theme-font:minor-latin;
mso-font-kerning:1.0pt;}

//登录

mysql -u root -p

//查看mysql系统时间。和当前时间做对比

select now();

//查看系统时区

show variables like '%time_zone%';

// 设置时区,更改为东八区

set global time_zone = '+8:00';

// 刷新权限

flush privileges;

 
 
参考文章
 

mysql time zone时区的错误解决的更多相关文章

  1. MySQL程序端启动密码错误解决方法

    MySQL程序端启动密码错误解决方法 一般启动MySQL程序端,都是用mysql -uroot -p命令,当然前提是你的环境变量已经配好了. 为了连接服务器,当调用mysql时,通常需要提供一个MyS ...

  2. mysql主从同步原理及错误解决

    mysql主从同步的原理: 1.在master上开启bin-log日志功能,记录更新.插入.删除的语句. 2.必须开启三个线程,主上开启io线程,从上开启io线程和sql线程. 3.从上io线程去连接 ...

  3. 连接mysql报zone时区错误

    报错信息: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zon ...

  4. Amazon RDS MySQL数据库还原时 log_bin_trust_function_creators 错误解决办法

    使用了Amazon AWS EC2免费云空间,数据库实例采用Amazon RDS.原来在Windows Server上有一个存在大量数据的MySQL数据库.现在需要在Amazon RDS上还原这个My ...

  5. mysql中连接失败2003错误解决办法

    在使用mysql数据库,新建连接时,会报2003-Can't connect to server on 'localhost'(10038)错误,原因主要是MYSQL服务没有启动起来,但是进入:计算机 ...

  6. Navicat for mysql远程连接数据库详(1130错误解决方法)

    用Navicat for mysql连接数据库测试下连接 如果出现1130错误错误代码是1130,ERROR 1130: Host xxx.xxx.xxx.xxx is not allowed to ...

  7. mysql 服务意外停止1067错误解决办法小结

    今天在配置服务器时安装mysql5.5总是无法安装,查看日志错误提示为1067错误,下面来看我的解决办法 事件类型: 错误 事件来源: Service Control Manager 事件种类: 无  ...

  8. 登录MySQL提示ERROR 1045 (28000)错误解决方法

    今天,登录服务器准备修改数据库的一些东西.但输入密码,却进不了数据库并提示一个错误,如下图 再确认密码没错的情况下,还是进不了数据库.便在网上找到了解决方法,记录下来,供参考学习. 解决方法: 总体思 ...

  9. MySQL出现GROUP BY clause错误解决办法

    #1)当mysql数据库出现如下错误:#which is not functionally dependent on columns in GROUP BY clause; this is incom ...

随机推荐

  1. Winform/WPF Clipboard之剪切复制粘贴

    Winform // <summary> /// 复制或剪切文件至剪贴板(方法) /// </summary> /// <param name="files&q ...

  2. springcloud搭建服务注册中心与服务发现

    1.创建服务注册中心 创建一个普通的Spring Boot工程 首先我们需要创建一个普通的Spring Boot工程,命名为eureka-server,普通到什么程度呢?就是一个starter都不需要 ...

  3. MYSQL数据库链接层- SUMMER-SQL

    2015年3月31日 18:27:34 最后编辑: 2016年4月17日 00:22:00 星期日 最后编辑: 2018-4-25 16:58:44 星期三 最新代码: https://gitee.c ...

  4. Python 单例模式讲解

    Python 单例模式讲解 本节内容: classmethod用途 单例模式方法一 类__new__方法讲解 单例模式方法二 前言: 使用单例方法的好处:对于一个类,多次实例化会产生多个对象,若使用单 ...

  5. day25作业

    1.阻塞  2.就绪  3.阻塞  4.Runnable  5.join()  6.synchronized  7.notify()和notifyAll()   8.Object 1.A   2.D  ...

  6. Java编程的逻辑 (59) - 文件和目录操作

    本系列文章经补充和完善,已修订整理成书<Java编程的逻辑>,由机械工业出版社华章分社出版,于2018年1月上市热销,读者好评如潮!各大网店和书店有售,欢迎购买,京东自营链接:http:/ ...

  7. scanf 输入加逗号(或者不加逗号)出现的异常及解决方案

    我们在写 C 语言代码通常 scanf 的格式控制部分都有两种习惯,加逗号与不加逗号,而这两种情况都会因为我们的不同输入习惯产生一定的问题,这里给出另一种方法. 1.不加逗号 #include< ...

  8. FileSystemResource在Srping FrameWork 5中的变化

    之前在项目中一直使用FileSystemResource这个类作为PropertyPlaceholderConfigurer的Resource引入部署目录外的配置文件,并设置了setIgnoreRes ...

  9. 微信WeixinJSBridge的接口使用

    以下都要包含weixinApi.js(见底部git里的js文件) 1).分享 WeixinApi.ready(function(Api) { // 微信分享的数据 var wxData = { &qu ...

  10. 迷茫于Hibernate/JPA的人提一些建议。

    想对那些“迷惑”于Java ORM框架的J2EE开发人员提一些建议,希望能够对他们 更深入的理解和运用J2EE ORM框架来提速工作有所帮助,这些建议可能显得有些”陈旧“和”肤浅“, 因为最近半年我没 ...