Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to set permanent default timezone in mysql server

Tags:

mysql

I am using default_time_zone='+00:00' in my.conf file and restart mysql server. But again default time zone is showing SYSTEM.

like image 798
Ankit Kumar Avatar asked Nov 11 '13 10:11

Ankit Kumar


2 Answers

In my.conf file, try:

[mysqld]
...
# default_time_zone='+00:00'
default-time-zone=+00:00
...

Documentation: 5.1.3. Server Command Options: --default-time-zone=timezone

like image 58
wchiquito Avatar answered Sep 21 '22 19:09

wchiquito


I use Ubuntu so on my machine location of the config file is:

/etc/mysql/mysql.conf.d/mysqld.cnf

add the value:

default_time_zone='+00:00'
like image 27
IKo Avatar answered Sep 22 '22 19:09

IKo