mysql_tzinfo_to_sql

Langue: en

Version: 07/04/2007 (mandriva - 22/10/07)

Section: 1 (Commandes utilisateur)

 

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 8.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 1997-2007 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

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.