How to Fix MySQL Fatal error: Illegal or unknown default time zone

Tags: October 19, 2014 2:36 PM

Problem

You want to set the default timezone for MySQL using my.cnf configuration file. But MySQL unable to start and the error log says:

Fatal error: Illegal or unknown default time zone 'NAMED_TIMEZONE'

Solution

Do not use named timezone unless you had timezone data populated on your mysql database. Instead use an offset relative to the UTC e.g: '+07:00' or '-04:00'.

[mysqld]

# generic configuration options
port            = 3306
socket          = /var/run/mysqld/mysqld.sock
default-time-zone = '+00:00'

Reference

Share on Facebook Twitter

0 comments:

Post a Comment