How to add MySQL time zone tables on Windows

I’m working with a database that needs to be populated with time zone data. Turns out that on Unix-based systems, this is rather simple and can be done entirely from the command line. On Windows though (and apparently HP-UX too), you can’t use that method. Instead, the MySQL site has downloads here:

Time zone description tables

I needed this tonight so I grabbed the zip, extracted, and went… wtf…

So maybe I’m dumb, but I expected SQL files I could import via my client or even the command line. I had absolutely no idea what in the heck this was.

Turns out - these are the actual physical file formats used by MySQL to store data. To restore these files, you literally just find your database directory (you can find the root by looking at your MySQL my.ini file) and just copy them in. That’s it.

I restarted MySQL just… well just because I figured I’d need to, and it the tables (and data) showed up.

Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate for Extend by Auth0. He focuses on serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support.

Lafayette, LA