Load Timezone Tables in MySQL 5.1 on Windows 7

by 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!

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