连接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 'Öйú±ê׼ʱ¼ä' ...
随机推荐
- java手写线程池,完善中
package com.test001.threadpool; import java.util.LinkedList; import java.util.List; import java.util ...
- datetime 计算时间差
计算时间差: .date() # 格式化 .timedelta() # 时间差 import datetime # 今天 today = datetime.datetime ...
- vs2017无法安装
vs2017无法安装,无错误提示和日志 参考:https://blog.csdn.net/jq0123/article/details/83987686 但是解决方法不一样,运行安装程序没有提示,需要 ...
- python处理日志文件
python处理日志文件 1 打开日志文件 虽然,日志文件的后缀为.log,但是基本上与文本文件没有区别,按照一般读取文本文件的方式打开即可: fp =open("e:\\data.log& ...
- SecureCRT通过密钥登录(网上也有很多教程,但是有些不详细,此教程本人亲测)
1.先打开SecureCRT,标题标--工具---创建公钥,如图: 2.点击创建公钥,弹出选项点下一步 3.继续点下一步: 4.继续点下一步: 5.继续点下一步(密钥长度默认1024即可),生成密钥需 ...
- Qt QML 2D shader
--------------------------------------------------- Qt quick 2d shader effect ---------------------- ...
- 易爆物D305
分析:典型的并查集,每一个物品合一看成一个独立的顶点,则一个简单化合物就是一条边,如果两个顶点x,y联通则说明有危险,所以可以用一个并查集来维护图的联通分量集合,并查集的详解有一篇写的很易懂的博客并查 ...
- 【SparkStreaming学习之四】 SparkStreaming+kafka管理消费offset
环境 虚拟机:VMware 10 Linux版本:CentOS-6.5-x86_64 客户端:Xshell4 FTP:Xftp4 jdk1.8 scala-2.10.4(依赖jdk1.8) spark ...
- 20175208《Java程序设计》第五周学习总结
教材学习内容总结 1.接口:1)接口声明: interface //接口的名字 2)接口体2.实现接口:类实现接口:一个类需要在类声明中使用关键字implements声明该类实现一个或多个接口.如果实 ...
- springboot集成themeleaf报Namespace 'th' is not bound
<!DOCTYPE html><!--解决th报错 --><html lang="en" xmlns:th="http://www.w3.o ...