mysqldump
— A Database Backup Program
306
Include triggers for each dumped table in the output. This option is enabled by default; disable it with
--skip-triggers
[305]
. This option was added in MySQL 5.0.11. Before that, triggers are not
dumped.
•
--tz-utc
[306]
This option enables
TIMESTAMP
columns to be dumped and reloaded between servers
in different time zones.
mysqldump
sets its connection time zone to UTC and adds
SET
TIME_ZONE='+00:00'
to the dump file. Without this option,
TIMESTAMP
columns are dumped and
reloaded in the time zones local to the source and destination servers, which can cause the values
to change if the servers are in different time zones.
--tz-utc
[306]
also protects against changes
due to daylight saving time.
--tz-utc
[306]
is enabled by default. To disable it, use
--skip-tz-
utc
[306]
. This option was added in MySQL 5.0.15.
•
--user=user_name
[306]
,
-u user_name
The MySQL user name to use when connecting to the server.
•
--verbose
[306]
,
-v
Verbose mode. Print more information about what the program does.
•
--version
[306]
,
-V
Display version information and exit.
•
--where='where_condition'
[306]
,
-w 'where_condition'
Dump only rows selected by the given
WHERE
condition. Quotes around the condition are mandatory
if it contains spaces or other characters that are special to your command interpreter.
Examples:
--where="user='jimf'"
-w"userid>1"
-w"userid<1"
•
--xml
[306]
,
-X
Write dump output as well-formed XML.
NULL
,
'NULL'
, and Empty Values: For a column named
column_name
, the
NULL
value, an empty
string, and the string value
'NULL'
are distinguished from one another in the output generated by
this option as follows.
Value:
XML Representation:
NULL
(unknown value)
<field name="column_name"
xsi:nil="true" />
''
(empty string)
<field name="column_name"></field>
'NULL'
(string value)
<field name="column_name">NULL</
field>
Beginning with MySQL 5.0.26, the output from the
mysql
client when run using the
--xml
[270]
option also follows the preceding rules. (See
Section 4.5.1.1, “
mysql
Options”
.)
Beginning with MySQL 5.0.40, XML output from
mysqldump
includes the XML namespace, as
shown here:
shell>
mysqldump --xml -u root world City
<?xml version="1.0"?>
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...