MySQL 服务器返回无效时区。转到高级选项卡并手动设置 servertimezone 属性
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/57665645/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Server returns invalid timezone. Go to Advanced tab and set servertimezone property manually
提问by Puchkii
My Intelij IDE wont connect to my database server of MySQL Workbench, it specifies it as a timezone problem and wants me to go to advanced tab and set serverTimezone property manually.
我的 Intelij IDE 无法连接到我的 MySQL Workbench 数据库服务器,它将其指定为时区问题,并希望我转到高级选项卡并手动设置 serverTimezone 属性。
I tried looking if there where a similar problem but i cant seem to find it.
我试着寻找是否有类似的问题,但我似乎无法找到它。
回答by CrazyCoder
In the Databasetool window, right click on the data source, choose Properties(Shift+Enter), click on the Advancedtab.
在数据库工具窗口中,右键单击数据源,选择属性( Shift+ Enter),单击高级选项卡。
Set the serverTimezone
property to UTC
.
将serverTimezone
属性设置为UTC
。
See also the corresponding documentation page.
另请参阅相应的文档页面。
回答by Dung
@CrazyCoder is correct but here is a more details answer:
@CrazyCoder 是正确的,但这里有一个更详细的答案:
In DataGrip right click on your database
drop down menu click on Properties
then go to Advanced and slowly look for severTimeZone as in this attachement below:
在 DataGrip 中右键单击您的database
下拉菜单,Properties
然后转到 Advanced 并慢慢查找 severTimeZone,如下面的附件所示:
Don't forget to click on apply and test again it should work.
不要忘记单击应用并再次测试它应该可以工作。
Done.
完毕。
回答by Seymur Mammadli
I had same problem. Running
我有同样的问题。跑步
SET GLOBAL time_zone = '+8:00';
SET GLOBAL time_zone = '+8:00';
on MySql command line solved the problem!
在 MySql 命令行上解决了这个问题!