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';

 

猜你喜欢

转载自www.cnblogs.com/simyeo/p/11420028.html
今日推荐