Name

mysqldump

Synopsis

mysqldump [options] database[table]

Outputs the contents of the given database (or table within a database) as a series of ANSI SQL commands. This command is handy for breaking up a database; use the -1 and -opt options.

Options

-?, --help

Display usage information.

-# debuglevel, --debug=debuglevel

Set the debugging level. A list of all of the available options can be found at http://www.turbolift.com/mysql/appendixC.html.

--add-drop-table

Include a DROP TABLE statement before every CREATE TABLE.

--add-locks

Add LOCK TABLE statements around the data insertion statements.

--allow-keywords

Output column names that are also reserved keywords. This is not normally desirable as the column may conflict with the keyword.

-c, --compleat-insert

Output complete INSERT statements.

-C, --compress

Use data compression in the connection with the server.

--delayed

Use the INSERT DELAYED statement to insert rows.

-d, --no-data

Do not dump the data, just the table creation statements.

-e, --extended-insert

Uses the multiple-value form of the INSERT statement which can speed up data insertion.

-f, --force

Do not exit if an error is encountered.

-F, --flush-logs

Flush buffered log data before dumping the table(s).

--fields-enclosed-by=delimeter

When dumping with -T, this delimiter is placed on both sides of each field.

--fields-escaped-by=delimeter

When dumping with -T, this delimiter is placed before any special character as an escape character.

--fields-terminated-by=delimeter

When dumping with -T, this ...

Get MySQL and mSQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.