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!