Change mysql timezone

June 14th, 2015 § 0 comments

The MySQl server will use the same timezone as its system, if we didn’t specify the time zone in /etc/mysql/my.cnf file. If you want to specify a different timezone you need to edit the /etc/mysql/my.cnf file.

You need to add default_time_zone=’+00:00′ below [mysqld] section to set timezone to GMT.


[mysql]
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
default_time_zone='+00:00'

Revath S Kumar [RSK]

- Rubyist / JavaScripter - Yeoman Team member - Open source enthusiast - Blogger @ PHPRepo and http://blog.revathskumar.com - Coder @ Whatznear - Google fanboy - jQuery lover

More Posts - Website - Twitter - Facebook - LinkedIn - Pinterest - Google Plus - YouTube

Comments are closed.