Load Timezone Tables in MySQL 5.1 on Windows 7

by Dave Naffziger on October 15, 2009 at 4:43 pm

I was surprised to learn that my MySQL package didn’t have useful timezone tables. Much of the content on the web revolves around generating these tables, and it took a little sorting out to figure out how to install them. Hopefully this post makes it easier for other people to figure it out as well.

I’ve specifically done this install with MySQL 5.1 and Windows 7, but it might work with Vista, XP, etc. and other versions of MySQL

  1. Download and unzip the data files. As of this writing, they can be found at http://dev.mysql.com/downloads/timezones.html. There are a handful of files in this zip.
  2. Locate your MySQL Data Directory. Mine was located at: C:\ProgramData\MySQL\MySQL Server 5.1\data\mysql However, this setting can be changed in the my.ini file of your MySQL executable so check there if you can’t find it. Make sure you find the directory for mysql in the data directory. You should see the existing (empty) timezone files there.
  3. Stop the MySQL Service. Control Panel > System & Security > Administrative Tools > Services Select MySQL, right click and ‘Stop the service’
  4. Copy and replace the files into the data directory
  5. Restart the service. Right click the MySQL setting and select ‘start service’

That should do it. Good luck!

  • Byron

    doesn’t seem to work with Mysql 5.5 and Windows 7 SP1. Worked with Windows Server 2003, might be some weird permission issue with Win 7?

  • Chris Bowyer

    Same issue as Byron with MySQL 5.5 and Vista SP2

  • Pouya

    Same issue as Byron and Chris Bowyer with MySQL 5.5.9 and Windows 7 SP1

  • Pouya

    I solved the problem, under C there are two folders “Program Files” and “ProgramData”. the ProgramData is hidden to make it visible go to Tools>Folder Options>View and select “Show hidden files, folders and drives” and OK that then you should see “ProgramData”. go to C:ProgramDataMySQLMySQL Server 5.1datamysql, Stop the MySQL Service, paste the 15 extracted files and overwrite the same ones then Restart the service. sorry for bad english

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License. | Dave Naffziger’s Blog | Dave & Iva Naffziger