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