MYSQL_TZINFO_TO_S(1)

NAME
mysql_tzinfo_to_sql - load the time zone tables

SYNOPSIS

mysql_tzinfo_to_sql arguments

DESCRIPTION

The mysql_tzinfo_to_sql program loads the time zone tables in the mysql database. It is used on systems that have a zoneinfo database (the set of files describing time zones). Examples of such systems are Linux, FreeBSD, Sun Solaris, and Mac OS X. One likely location for these files is the /usr/share/zoneinfo directory. If your system does not have a zoneinfo database, you can use the downloadable package described in Section 9.8, “MySQL Server Time Zone Support”.

mysql_tzinfo_to_sql can be invoked several ways:

    shell> mysql_tzinfo_to_sql tz_dir
    shell> mysql_tzinfo_to_sql tz_file tz_name
    shell> mysql_tzinfo_to_sql --leap tz_file

For the first invocation syntax, pass the zoneinfo directory pathname to mysql_tzinfo_to_sql and send the output into the mysql program. For example:

    shell> mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql

mysql_tzinfo_to_sql reads your system's time zone files and generates SQL statements from them. mysql processes those statements to load the time zone tables.

The second syntax causes mysql_tzinfo_to_sql to load a single time zone file tz_file that corresponds to a time zone name tz_name:

    shell> mysql_tzinfo_to_sql tz_file tz_name | mysql -u root mysql

If your time zone needs to account for leap seconds, invoke mysql_tzinfo_to_sql using the third syntax, which initializes the leap second information. tz_file is the name of your time zone file:

    shell> mysql_tzinfo_to_sql --leap tz_file | mysql -u root mysql

COPYRIGHT

Copyright 1997-2006 MySQL AB

This documentation is NOT distributed under a GPL license. Use of this documentation is subject to the following terms: You may create a printed copy of this documentation solely for your own personal use. Conversion to other formats is allowed as long as the actual content is not altered or edited in any way. You shall not publish or distribute this documentation in any form or on any media, except if you distribute the documentation in a manner similar to how MySQL disseminates it (that is, electronically for download on a Web site with the software) or on a CD-ROM or similar medium, provided however that the documentation is disseminated together with the software on the same medium. Any other use, such as any dissemination of printed copies or use of this documentation, in whole or in part, in another publication, requires the prior written consent from an authorized representative of MySQL AB. MySQL AB reserves any and all rights to this documentation not expressly granted above.

Please email <docs@mysql.com> for more information.

SEE ALSO
msql2mysql(1), my_print_defaults(1), myisam_ftdump(1), myisamchk(1), myisamlog(1), myisampack(1), mysql(1), mysql.server(1), mysql_config(1), mysql_explain_log(1), mysql_fix_privilege_tables(1), mysql_upgrade(1), mysql_zap(1), mysqlaccess(1), mysqladmin(1), mysqlbinlog(1), mysqlcheck(1), mysqld(8), mysqld_multi(1), mysqld_safe(1), mysqldump(1), mysqlhotcopy(1), mysqlimport(1), mysqlmanager(8), mysqlshow(1), perror(1), replace(1), safe_mysqld(1)

For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available online at http://dev.mysql.com/doc/.

AUTHOR
MySQL AB (http://www.mysql.com/). This software comes with no warranty.