连接MySQL报错The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone.
MySQL time zone 时区错误
使用root用户登陆执行命令:
---> show variables like '%time_zone%';
默认值system为美国时间;如下图:

因此,只需要将值设置为系统时区 也就是 +8:00 格式
方法一:
执行---> set global time_zone='+8:00'; #修改mysql全局时区为北京时间,即我们所在的东8区
---> set time_zone = '+8:00'; #修改当前会话时区
---> flush privileges; #立即生效

方法二:
修改mysql根目录下的my.ini文件 ,在文件的 [mysqld] 节点下加入:default-time-zone='+8:00'

连接MySQL报错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 one time zone...
time zone 时区错误 DBEAVER连接MySQL运行报错The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or repres ...
- Spring Boot连接MySQL报错“Internal Server Error”的解决办法
报错信息如下: {timestamp: "2018-06-14T03:48:23.436+0000", status: 500, error: "Internal Ser ...
- 解决MySQL报错The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents .....
1.前言 今天在用SpringBoot2.0+MyBatis+MySQL搭建项目开发环境的时候启动项目发现报了一个很奇怪的错,报错内容如下: java.sql.SQLException: The se ...
- PHP连接MySQL报错:SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket 'MySQL' (2)
如下所示,PHP连接MySQL报错: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket 'MySQL' ...
- Asp.Net连接Mysql报错Out of sync with server
Asp.Net连接Mysql报错Out of sync with server 原因:程序引用的MySql.Data.dll版本高于服务器版本 解决:下载一个低版本的MySql.Data.dll,项目 ...
- Navicat连接Mysql报错:Client does not support authentication protocol requested by server;
Navicat连接Mysql报错:Client does not support authentication protocol requested by server: 刚安装Mysql,想用Nav ...
- mysql报错:java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone.
mybatis链接mysql,启动服务报错: java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecogni ...
- SpringBoot------连接MySQL报错:The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized
报错提示: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zon ...
- JDBC连接数据库报错:java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone. ......
问题:Java程序使用JDBC连接MySQL数据库时,控制台报错如下: java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' ...
随机推荐
- Ajax原理以及优缺点
ajax原理和XmlHttpRequest对象 Ajax的原理简单来说通过XmlHttpRequest对象来向服务器发异步请求,从服务器获得数据,然后用javascript来操作DOM而更新页面.这其 ...
- 基于token与基于服务器的身份认证
1.基于服务器的身份认证 我们清楚 http 协议是无状态的,也就是说,如果我们已经认证了一个用户,那么他下一次请求的时候,服务器不知道我是谁,我们就必须要再次认证. 我们与浏览器交互时,比如说登陆成 ...
- java实现控件的移动及使用鼠标改变控件大小
package cn.com.test; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; ...
- windows下安装配置postgreSQL
1.下载 postgresql-10.4-1-windows-x64.exe 进行安装 2.环境配置(1)文本使用的IDE是VS2010,我们需要配置包含目录(include).库目录(lib).链接 ...
- Cocos Creator 按钮音效封装重写
cc.Button.prototype._onTouchEnded = function (t) { cc.hb.audioMgr.playMusic("click", false ...
- notify.min.js
/*! * @wcjiang/notify v2.0.11 * JS achieve the browser title flashing , scrolling, voice prompts , c ...
- 扫黑除恶Team second
团队介绍: 团队序号:② 团队名称:扫黑除恶 团队项目:飞机大战游戏 团队码云地址:https://gitee.com/MrLiu199903/seflash/branches 撰写人:刘新飞 学号: ...
- linux----------启动network的时候报错Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.
1.仔细阅读上面的话,意思是让你执行 journalctl -xe 查看更详细的日志. 2.我当时导致这个情况的原因是因为,虚拟机加载的文件被我换了位置,导致没加载到最原始的centos包.关闭虚拟 ...
- asp.net无限递归
private void button1_Click(object sender, EventArgs e) { DialogResult dialogResult = folderBrowserDi ...
- Java设计模式之动态代理
关于Proxy: 1,他是所有动态代理的父类: 2,他可以用作创建动态代理类和动态代理对象: 3,JDK中自带的动态代理. 1,首先创建一个接口,方法申明如下: package com.proxy; ...