113

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.

I tried looking if there where a similar problem but i cant seem to find it.

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
Puchkii
  • 1,240
  • 2
  • 6
  • 7
  • 3
    Do you mean that you can't find [this dialog](https://i.imgur.com/kmMgJ8T.png)? – CrazyCoder Aug 26 '19 at 22:39
  • Setting the paramter to UTC fixed it for me too. Interesting reasons: https://stackoverflow.com/questions/930900/how-do-i-set-the-time-zone-of-mysql – Grimax Mar 18 '20 at 15:15

5 Answers5

233

In the Database tool window, right click on the data source, choose Properties (Shift+Enter), click on the Advanced tab.

Set the serverTimezone property to UTC.

See also the corresponding documentation page.

Advanced

arntg
  • 1,557
  • 14
  • 12
CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
  • 1
    A little hidden in the answer but this helped me. Setting the paramter to UTC fixed it for me. – Mark E Sep 04 '19 at 15:22
16

@CrazyCoder is correct but here is a more details answer:

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:

enter image description here

Don't forget to click on apply and test again it should work.

Done.

Dung
  • 19,199
  • 9
  • 59
  • 54
7

I had same problem. Running

SET GLOBAL time_zone = '+8:00';

on MySql command line solved the problem!

Seymur Mammadli
  • 1,724
  • 15
  • 13
3

You need to set 'serverTimezone' with 'UTC'. But use upper case!

Open Properties, in mac use (Command + ;), click on the Advanced tab.

enter image description here

AlexSh
  • 1,468
  • 15
  • 12
-1

You can follow the picture find the configuration , Set Time zone = UTC

spike 王建
  • 1,556
  • 5
  • 14