MySQL and Daylight Savings Time change

In a previous post I mentioned about patches needed to accomadate the new DST changes for Sql Server. (I know, this is one of Dannyman’s favorite subjects ;))

For MySQL, obviously you need to patch the host server first. Then you need to find out if MySQL needs separate work. Here is a note I gathered. Let me know if I am wrong on this or if there is a better way.

1. Get into mysql and do \s to find out the version of your MySQL.

If it is prior to 4.1.3, don’t worry about it.


2. Do select @@global.time_zone;

If the result is SYSTEM, don’t worry about it.


You need to load time zone info, usually at /usr/share/zoneinfo into your mysql database, by running something like:

# mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql

More information available at MySQL’s documentation site.


One response to “MySQL and Daylight Savings Time change”

  1. Hi,
    I tried the above commands to reload time zone info,
    but i get error like,
    -bash:mysql_tzinfo_to_sql : command not found.
    I have /usr/share/zoneinfo directory.
    please help.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.