Skip to content

Instantly share code, notes, and snippets.

@insane-dev
Created April 27, 2017 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save insane-dev/5f72a9a4bd8e6ce5313c5dfae23f0724 to your computer and use it in GitHub Desktop.
Save insane-dev/5f72a9a4bd8e6ce5313c5dfae23f0724 to your computer and use it in GitHub Desktop.
Set timezone for MySQL
# Populate the Time Zone Tables from your system into the MySQL:
# @see https://dev.mysql.com/doc/refman/5.7/en/time-zone-support.html#time-zone-installation
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql
# In `/etc/mysql/my.cnf` add following line under [mysqld] config group:
[mysqld]
default-time-zone=Europe/Kiev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment