Data maintenance using the Mysqldump tool in MySQL

Source: Internet
Author: User
Tags table name

Using the Mysqldump tool, the basic usage is:

Shell> mysqldump [OPTIONS] database [tables]

If you do not give any tables, the entire database will be exported.

By executing mysqldump--help, you can get the options table supported by your mysqldump version.

Note that if you run mysqldump without--quick or--opt option, mysqldump will load the results before exporting

The entire result set into memory, if you are exporting a large database, this will probably be a problem.

Mysqldump supports the following options:

--add-locks

Add lock tables before each table is exported and then unlock table. (in order to allow faster insertion into MySQL).

--add-drop-table

Add a drop table before each create statement.

--allow-keywords

Allow creation of column names that are keywords. This is done by the table name prefix in each column name.

-C,--complete-insert

Use the full INSERT statement (with the column name).

-C,--compress

If both the client and the server support compression, compress all the information between the two.

--delayed

Inserts a row with the insert delayed command.

-E,--extended-insert

Use the new multiple-line insert syntax. (Gives a tighter and faster insert statement)

-#,--debug[=option_string]

Trace the use of the program (for debugging).

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.