Detailed description of the MySQL instance for exporting data in the specified table, detailed description of mysql

Source: Internet
Author: User

Detailed description of the MySQL instance for exporting data in the specified table, detailed description of mysql

How MySQL exports data from a specified table

Requirements:

1. Do not export the statement for table creation, because the table has been created: exported by default, drop table first and then create table;
2. Add ignore to the exported insert statement to allow repeated execution: ignore is not added by default;
3. List the fields in the table in the insert statement. You can see more clearly: No by default;
4. Multiple insert statements are generated based on records, which are easy to modify: one statement is used by default;

The final result is as follows:

mysqldump -pxxxxxx qzt qf1_mail_account --no-create-info --insert-ignore --complete-insert --skip-extended-insert >qf1_mail_account.sql

Where:

-Pxxxxxx specify the password
Qzt Database Name
Qf1_mail_account table name
> Qf1_mail_account. SQL: Save it to a file

Mysqldump -- help writes

 -t, --no-create-info            Don't write table creation info. --insert-ignore   Insert rows with INSERT IGNORE. -c, --complete-insert            Use complete insert statements. -e, --extended-insert            Use multiple-row INSERT syntax that include several           VALUES lists.           (Defaults to on; use --skip-extended-insert to disable.)

If you have any questions, please leave a message or go to the community on this site for discussion. Thank you for reading this article. Thank you for your support!

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.