
-extended-insert - Write INSERT statements using multiple-row syntax that includes several VALUES lists.This makes loading the dump file faster (for MyISAM tables) because the indexes are created after all rows are inserted. -disable-keys - This option is effective only for nonunique indexes of MyISAM tables.In testing this (turn it off using -create-options=false), I found that the main/most obvious difference was the absense of AUTO_INCREMENT on primary keys when setting this option to false. -create-options - Include all MySQL-specific table options in the CREATE TABLE statements.This means that while you're importing data, each table will be locked from reads and writes while it's (re-)creating a table. This results in faster inserts when the dump file is reloaded. Surrounds each table dump with LOCK TABLES and UNLOCK TABLES statements. -add-locks - This applies when you're importing your dump file (not when running mysqldump).-add-drop-table - Write a DROP TABLE statement before each CREATE TABLE statement, letting you re-use the resulting.The opt option is an alias for the following flags: Unless we explicitly tell it not to, mysqldump is using the -opt flag. Defaultsįirst, let's cover mysqldump's defaults. If you're using mysqldump against a production database, it's usage can cause real issues for your users while it's running. However, it's worth digging into this command a bit to learn what's going on. Mysqldump some_database | pv | gzip > some_ # flowing between our pipes - useful for knowing if the msyqldump # Or with the "pv" tool, which let's us know how much data is Mysqldump -u some_user -p some_database > some_database.sql Here's how I've typically exported a single database: mysqldump some_database > some_database.sql Mysqldump has many options ( I count 111 options ?).
