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

  1. 连接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 ...

  2. Spring Boot连接MySQL报错“Internal Server Error”的解决办法

    报错信息如下: {timestamp: "2018-06-14T03:48:23.436+0000", status: 500, error: "Internal Ser ...

  3. 解决MySQL报错The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents .....

    1.前言 今天在用SpringBoot2.0+MyBatis+MySQL搭建项目开发环境的时候启动项目发现报了一个很奇怪的错,报错内容如下: java.sql.SQLException: The se ...

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

  5. Asp.Net连接Mysql报错Out of sync with server

    Asp.Net连接Mysql报错Out of sync with server 原因:程序引用的MySql.Data.dll版本高于服务器版本 解决:下载一个低版本的MySql.Data.dll,项目 ...

  6. Navicat连接Mysql报错:Client does not support authentication protocol requested by server;

    Navicat连接Mysql报错:Client does not support authentication protocol requested by server: 刚安装Mysql,想用Nav ...

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

  8. SpringBoot------连接MySQL报错:The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized

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

  9. 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 'Öйú±ê׼ʱ¼ä' ...

随机推荐

  1. yii的数据库相关操作

    获取某一列数据 self::find()->where(['pid'=>$this->id])->select('id')->column(); 更新操作 $model- ...

  2. maven插件--assembly

    之前maven项目中使用assembly插件单独打包项目依赖包,项目只有一个模块也就一个pom,配置这个插件,一切很顺利.但是现在的项目复杂了,有parent有child,多模块.按照之前的做法怎么也 ...

  3. linux cp 拷贝文件或目录

    cp 拷贝文件或目录 默认不能拷贝目录 常用来备份: [root@MongoDB ~]# cp a.txt /tmp/ [root@MongoDB ~]# cp /root/a.txt /tmp/ c ...

  4. kubernetes集群应用部署实例

    今天,我们将要带来入门hello world示例,它是一个web留言板应用,基于PHP+Redis的两层分布式架构的web应用,前端PHP web网站通过访问后端Redis数据库完成用户留言的查询和添 ...

  5. 【长文】Google面试官分步解析自己泄漏前的面试题,超多干货和建议

    本文翻译自Google工程师/面试官Alex Golec的文章:Google Interview Questions Deconstructed: The Knight's Dialer:翻译:实验楼 ...

  6. E. Neko and Flashback

    传送门: 题意:假定我们已知a[]={3,4,6,5,7},  那么b[]通过min(a[i],a[i+1])得到 那么b[]={3,4,5,5}, c[]通过max(a[i],a[i+1])得到 c ...

  7. laravel----------Client error: `POST http://47.98.116.219/oauth/token` resulted in a `401 Unauthorized` response: {"error":"invalid_client","message":"Client authentication failed"}

    1.设备没有授权,原因是 这个client_id的值就是数据库wk_oauth_clients 的主键ID,查看下表是否有这条数据

  8. orcl数据库锁等级研究小记

    上周通过orcl 悲观锁的方式解决了一个并发临界值的问题.现在来研究下orcl各中锁的机制以及如何手动释放锁. 首先,通过查阅资料,先了解下数据的的各种操作语言分类. SQL语言共分为四大类:数据查询 ...

  9. git冲突管理

    Diff 查看工作区(working directory)和暂存区(staged)之间差异:git diff 查看工作区(working directory)与当前仓库版本(repository)HE ...

  10. HttpClient 知识点

    1. httpClient 默认超时时间是 60秒 2.httpClient 是模拟表单提交,所以服务端接口要用HttpServletRequest request 接收  例如: request.g ...