1MYSQL_TZINFO_TO_S(1) MariaDB Database System MYSQL_TZINFO_TO_S(1)
2
3
4
6 mysql_tzinfo_to_sql - load the time zone tables
7
9 mysql_tzinfo_to_sql arguments
10
12 The mysql_tzinfo_to_sql program loads the time zone tables in the mysql
13 database. It is used on systems that have a zoneinfo database (the set
14 of files describing time zones). Examples of such systems are Linux,
15 FreeBSD, Solaris, and Mac OS X. One likely location for these files is
16 the /usr/share/zoneinfo directory (/usr/share/lib/zoneinfo on Solaris).
17
18 mysql_tzinfo_to_sql can be invoked several ways:
19
20 shell> mysql_tzinfo_to_sql tz_dir
21 shell> mysql_tzinfo_to_sql tz_file tz_name
22 shell> mysql_tzinfo_to_sql --leap tz_file
23 shell> mysql_tzinfo_to_sql --skip-write-binlog tz_dir
24
25 For the first invocation syntax, pass the zoneinfo directory path name
26 to mysql_tzinfo_to_sql and send the output into the mysql program. For
27 example:
28
29 shell> mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql
30
31 mysql_tzinfo_to_sql reads your system´s time zone files and generates
32 SQL statements from them. mysql processes those statements to load the
33 time zone tables.
34
35 The second syntax causes mysql_tzinfo_to_sql to load a single time zone
36 file tz_file that corresponds to a time zone name tz_name:
37
38 shell> mysql_tzinfo_to_sql tz_file tz_name | mysql -u root mysql
39
40 If your time zone needs to account for leap seconds, invoke
41 mysql_tzinfo_to_sql using the third syntax, which initializes the leap
42 second information. tz_file is the name of your time zone file:
43
44 shell> mysql_tzinfo_to_sql --leap tz_file | mysql -u root mysql
45
46 Using the --skip-write-binlog option prevents writing of changes to the
47 binary log or to other Galera cluster members. This can be used with
48 any form of running mysql_tzinfo_to_sql.
49
50 After running mysql_tzinfo_to_sql, it is best to restart the server so
51 that it does not continue to use any previously cached time zone data.
52
54 Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.,
55 2010-2019 MariaDB Foundation
56
57 This documentation is free software; you can redistribute it and/or
58 modify it only under the terms of the GNU General Public License as
59 published by the Free Software Foundation; version 2 of the License.
60
61 This documentation is distributed in the hope that it will be useful,
62 but WITHOUT ANY WARRANTY; without even the implied warranty of
63 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
64 General Public License for more details.
65
66 You should have received a copy of the GNU General Public License along
67 with the program; if not, write to the Free Software Foundation, Inc.,
68 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see
69 http://www.gnu.org/licenses/.
70
71
73 For more information, please refer to the MariaDB Knowledge Base,
74 available online at https://mariadb.com/kb/
75
77 MariaDB Foundation (http://www.mariadb.org/).
78
79
80
81MariaDB 10.5 27 June 2019 MYSQL_TZINFO_TO_S(1)