MySQL Export database command: mysqldump

Source: Internet
Author: User

Grammar:

1. mysqldump [Options]-all-databases

2. mysqldump [Options]--databases database [Database ...]

3. mysqldump [Options] database [table]

Mysqldump can export data and table structures in MySQL. You can typically use the utility to back up a database or to copy a database from one server to another. You can execute the tool on a server that is in a running state. To maintain the consistency of data between tables, you need to locking the table (see--lock-tables option) or close the mysqld background.

The tool has three grammatical forms. The first syntax is used to back up all databases on the server. The second syntax is used to back up all tables in the specified database. The third syntax is used to back up the specified table for the specified database.

A sample of the first syntax is given below to back up all databases on the server.

Mysqldump--host=russell.dyerhouse.com--user=russell--password--lock-tables--all-databases >/tmp/workreque Sts.sql


MySQL Export database command: mysqldump

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.