PyCharm Community 2019.2 连接MySQL8.0 时区不同步的解决

Posted simyeo

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PyCharm Community 2019.2 连接MySQL8.0 时区不同步的解决相关的知识,希望对你有一定的参考价值。

Windows10中,PyCharm Community 2019.2  连接mysql8.0 连接错误,IDE提示如下:

Cannot connect to "MySQL8.0".
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.

解决步骤如下,参考链接:https://stackoverflow.com/questions/930900/how-do-i-set-the-time-zone-of-mysql

一,打开MySQL8.0 Command Line Client -unicode,输入MySQL密码登陆。

二,在登陆后输入如下代码,然后回车执行,即可顺利搞定。

1 SET GLOBAL time_zone = +8:00;

 

 

以上是关于PyCharm Community 2019.2 连接MySQL8.0 时区不同步的解决的主要内容,如果未能解决你的问题,请参考以下文章

Pycharm 激活方式

pycharm怎么导入django工程

转:pycharm community debug django projects

PyCharm Community 2021.2 安装教程(附汉化教程!)

Pycharm community配置Django

Pycharm(2017.2 community)+PyQt5.7+Designer