User Tools

Site Tools


mysql:exclude_drop_and_create_table_from_mysqldump

This is an old revision of the document!


MySQL - Exclude DROP and CREATE TABLE From mysqldump

How do you dump data from a mysql database table without the drop and create tables showing up before the inserts?

The following solution will just give you a list of insert statements. Simply use the options –skip-triggers –compact –no-create-info.

Here is an example.

mysqldump --skip-triggers --compact --no-create-info -u <username> -p <password> <database> <tables>
mysql/exclude_drop_and_create_table_from_mysqldump.1479725312.txt.gz · Last modified: 2020/07/15 10:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki