tags:

views:

149

answers:

1

Hi,

I am using MySQL 5.0.51b on microsoft windows xp. I am trying to load data from zoneinfo files(generated by library downloaded from here) to database tables as described here.

Now i am not able to find where would i get this "mysql_tzinfo_to_sql" program for windows. I tried executing it on mysql command line client but no success. On linux you can directly execute this command on the shell.

Any help is appreciated.

A: 

For Windows, MySQL supplies an already loaded database for you to download and stick in your data directory: http://dev.mysql.com/downloads/timezones.html

Copied from the user comments on the MySQl docs:

Posted by Jyotsna Channagiri on November 20 2008 6:28pm

Hi,

I thought this information will helps somebody who are looking for changing mysql timezone.

The steps are:

  1. Download the timezone table structure and data from http://dev.mysql.com/downloads/timezones.html

  2. Copy and paste the data in your Mysql/data/mysql folder

  3. Restart your mysql server.

  4. mysql> SET GLOBAL time_zone = 'America/Toronto';

  5. mysql> SET SESSION time_zone = 'America/Toronto';

  6. Check SELECT @ @global.time_zone , @ @session.time_zone ; It should give you the time zone you set just before.

Comment:

Yes, but the tables provided by MySQL are outdated (generated by 2006p version of D olson's timezone library). I need the latest timezones data, hence i downloaded the latest library and generated the binaries. Now i need a way to load these tables in mysql.But i don't know how to do it on windows.

Ah, I see. Then you're going to need to do one of two things. 1) get the tool that does this and compile it (or whatever) on Windows. If you're lucky, it's a perl script.

2) fill the database on linux, then copy it to Windows. [This guy][http://it-idiot.einsamsoldat.net/2008/01/moving-mysql-database-from-windows-to-linux-redhat/comment-page-1/2] says it can be done, at least for MyIsam.

tpdi
Yes, but the tables provided by MySQL are outdated (generated by 2006p version of D olson's timezone library).I need the latest timezones data, hence i downloaded the latest library and generated the binaries. Now i need a way to load these tables in mysql.But i don't know how to do it on windows.