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

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

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

1 SET GLOBAL time_zone = '+8:00';

方式二,步骤如下:

1,以管理员模式打开命令行,输入与方式一中步骤2所示同样的代码,并回车执行。

2,键入如下命令,并回车执行:

ipconfig /flushdns


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM