mysqldump
— A Database Backup Program
300
•
--default-character-set=charset_name
[300]
Use
charset_name
as the default character set. See
Section 10.5, “Character Set Configuration”
. If
no character set is specified,
mysqldump
uses
utf8
, and earlier versions use
latin1
.
This option has no effect for output data files produced by using the
--tab
[305]
option. See the
description for that option.
•
--delayed-insert
[300]
Write
INSERT DELAYED
statements rather than
INSERT
statements.
•
--delete-master-logs
[300]
On a master replication server, delete the binary logs by sending a
PURGE BINARY LOGS
statement
to the server after performing the dump operation. This option automatically enables
--master-
data
[302]
.
•
--disable-keys
[300]
,
-K
For each table, surround the
INSERT
statements with
/*!40000 ALTER TABLE tbl_name
DISABLE KEYS */;
and
/*!40000 ALTER TABLE tbl_name ENABLE KEYS */;
statements.
This makes loading the dump file faster because the indexes are created after all rows are inserted.
This option is effective only for nonunique indexes of
MyISAM
tables. It has no effect for other tables.
•
--dump-date
[300]
If the
--comments
[298]
option is given,
mysqldump
produces a comment at the end of the dump
of the following form:
-- Dump completed on
DATE
However, the date causes dump files taken at different times to appear to be different, even if
the data are otherwise identical.
--dump-date
[300]
and
--skip-dump-date
[300]
control
whether the date is added to the comment. The default is
--dump-date
[300]
(include the date
in the comment).
--skip-dump-date
[300]
suppresses date printing. This option was added in
MySQL 5.0.52.
•
--extended-insert
[300]
,
-e
Use multiple-row
INSERT
syntax that include several
VALUES
lists. This results in a smaller dump file
and speeds up inserts when the file is reloaded.
•
--fields-terminated-by=...
[300]
,
--fields-enclosed-by=...
[300]
,
--
fields-optionally-enclosed-by=...
[300]
,
--fields-escaped-by=...
[300]
These options are used with the
--tab
[305]
option and have the same meaning as the
corresponding
FIELDS
clauses for
LOAD DATA INFILE
. See
Section 13.2.6, “
LOAD DATA INFILE
Syntax”
.
•
--first-slave
[300]
Deprecated. Use
--lock-all-tables
[301]
instead.
--first-slave
[300]
is removed in
MySQL 5.5.
•
--flush-logs
[300]
,
-F
Flush the MySQL server log files before starting the dump. This option requires the
RELOAD
[577]
privilege. If you use this option in combination with the
--all-databases
[298]
option, the logs
are flushed for each database dumped. The exception is when using
--lock-all-tables
[301]
or
--master-data
[302]
: In this case, the logs are flushed only once, corresponding to the
moment that all tables are locked. If you want your dump and the log flush to happen at exactly
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 ...