How do I set the time zone of MySQL?

后端 未结 20 3728
闹比i
闹比i 2020-11-21 07:07

On one server, when I run:

mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2009-05-30 16:54:29 |
+---------         


        
20条回答
  •  庸人自扰
    2020-11-21 07:21

    In my case, the solution was to set serverTimezone parameter in Advanced settings to an appropriate value (CET for my time zone).

    As I use IntelliJ, I use its Database module. While adding a new connection to the database and after adding all relevant parameters in tab General, there was an error on "Test Connection" button. Again, the solution is to set serverTimezone parameter in tab Advanced.

提交回复
热议问题