maria-discuss team mailing list archive
-
maria-discuss team
-
Mailing list archive
-
Message #05144
Re: Timezones Table
Hi, Kurniadi!
On Jun 12, Kurniadi Asrigo wrote:
> Hi,
>
> I am following the instruction to update the timezone table from MySQL:
> https://mariadb.com/kb/en/library/time-zones/
>
> And the file is downloaded from MySQL page. I got MariaDB from XAMPP, running on Window10. I downloaded the "timezone_2018e_posix_sql.zip<https://downloads.mysql.com/general/timezone_2018e_posix_sql.zip> - POSIX standard"
>
> https://dev.mysql.com/doc/refman/5.5/en/time-zone-support.html
>
> Once downloaded, I extracted the package into a directory. From the instruction, I executed the command:
>
> .\mysql_tzinfo_to_sql.exe C:\dev\xampp_download\timezone\timezone_posix.sql | .\mysql.exe -D
>
> mysql -u root -p
>
> Now, the timezone Table is all empty. I am wondering if I am missing a step or an option.
No, you're doing one step too many. mysql_tzinfo_to_sql converts OS
timezone descriptions (in the form of tzinfo files) into sql. According
to the manual page you've mentioned it should be used as
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql
You downloaded timezone tables *already in SQL*. Quoting that manual
page, again
"
If your system is one that has no zoneinfo database (for example,
Windows), you can use a package that is available for download at the
MySQL Developer Zone:
http://dev.mysql.com/downloads/timezones.html
* To use a time zone package that contains SQL statements, download
and unpack it, then load the package file contents into your
existing time zone tables:
shell> mysql -u root mysql < file_name
"
Regards,
Sergei
Chief Architect MariaDB
and security@xxxxxxxxxxx
References