mysql_tzinfo_to_sql.1 4.11 KB
Newer Older
1
'\" t
2
.\"     Title: \fBmysql_tzinfo_to_sql\fR
3 4
.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
5
.\"      Date: 11/04/2009
6 7
.\"    Manual: MySQL Database System
.\"    Source: MySQL 5.1
8
.\"  Language: English
9
.\"
10
.TH "\FBMYSQL_TZINFO_TO_S" "1" "11/04/2009" "MySQL 5\&.1" "MySQL Database System"
11 12 13
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
14 15 16 17
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
18 19 20 21 22
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.\" mysql_tzinfo_to_sql
.\" time zone tables
23 24 25
.SH "NAME"
mysql_tzinfo_to_sql \- load the time zone tables
.SH "SYNOPSIS"
26
.HP \w'\fBmysql_tzinfo_to_sql\ \fR\fB\fIarguments\fR\fR\ 'u
27 28 29 30 31 32 33
\fBmysql_tzinfo_to_sql \fR\fB\fIarguments\fR\fR
.SH "DESCRIPTION"
.PP
The
\fBmysql_tzinfo_to_sql\fR
program loads the time zone tables in the
mysql
34
database\&. It is used on systems that have a
35
zoneinfo
36 37 38 39 40
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 (/usr/share/lib/zoneinfo
on Solaris)\&. If your system does not have a zoneinfo database, you can use the downloadable package described in
Section\ \&9.7, \(lqMySQL Server Time Zone Support\(rq\&.
41 42 43 44
.PP
\fBmysql_tzinfo_to_sql\fR
can be invoked several ways:
.sp
45 46 47
.if n \{\
.RS 4
.\}
48 49 50 51 52
.nf
shell> \fBmysql_tzinfo_to_sql \fR\fB\fItz_dir\fR\fR
shell> \fBmysql_tzinfo_to_sql \fR\fB\fItz_file tz_name\fR\fR
shell> \fBmysql_tzinfo_to_sql \-\-leap \fR\fB\fItz_file\fR\fR
.fi
53
.if n \{\
54
.RE
55
.\}
56 57 58 59 60
.PP
For the first invocation syntax, pass the zoneinfo directory path name to
\fBmysql_tzinfo_to_sql\fR
and send the output into the
\fBmysql\fR
61
program\&. For example:
62
.sp
63 64 65
.if n \{\
.RS 4
.\}
66 67 68
.nf
shell> \fBmysql_tzinfo_to_sql /usr/share/zoneinfo | mysql \-u root mysql\fR
.fi
69
.if n \{\
70
.RE
71
.\}
72 73
.PP
\fBmysql_tzinfo_to_sql\fR
74
reads your system\'s time zone files and generates SQL statements from them\&.
75
\fBmysql\fR
76
processes those statements to load the time zone tables\&.
77 78 79 80 81 82 83 84
.PP
The second syntax causes
\fBmysql_tzinfo_to_sql\fR
to load a single time zone file
\fItz_file\fR
that corresponds to a time zone name
\fItz_name\fR:
.sp
85 86 87
.if n \{\
.RS 4
.\}
88 89 90
.nf
shell> \fBmysql_tzinfo_to_sql \fR\fB\fItz_file\fR\fR\fB \fR\fB\fItz_name\fR\fR\fB | mysql \-u root mysql\fR
.fi
91
.if n \{\
92
.RE
93
.\}
94 95 96
.PP
If your time zone needs to account for leap seconds, invoke
\fBmysql_tzinfo_to_sql\fR
97
using the third syntax, which initializes the leap second information\&.
98 99 100
\fItz_file\fR
is the name of your time zone file:
.sp
101 102 103
.if n \{\
.RS 4
.\}
104 105 106
.nf
shell> \fBmysql_tzinfo_to_sql \-\-leap \fR\fB\fItz_file\fR\fR\fB | mysql \-u root mysql\fR
.fi
107
.if n \{\
108
.RE
109
.\}
110 111
.PP
After running
112
\fBmysql_tzinfo_to_sql\fR, it is best to restart the server so that it does not continue to use any previously cached time zone data\&.
113
.SH "COPYRIGHT"
114
.br
115
.PP
116
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.
117 118 119 120 121
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
.PP
122 123
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
124 125 126 127 128
.SH "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/.
.SH AUTHOR
129
Sun Microsystems, Inc. (http://www.mysql.com/).