MySQLDump one INSERT statement for each data row

后端 未结 2 1650
Happy的楠姐
Happy的楠姐 2020-12-12 10:39

with the following statement:

mysqldump --complete-insert --lock-all-tables --no-create-db 
--no-create-info --extended-insert --password=XXX -u XXX 
--dump-         


        
2条回答
  •  自闭症患者
    2020-12-12 10:46

    In newer versions change was made to the flags: from the documentation:

    --extended-insert, -e

    Write INSERT statements using multiple-row syntax that includes several VALUES lists. This results in a smaller dump file and speeds up inserts when the file is reloaded.

    --opt

    This option, enabled by default, is shorthand for the combination of --add-drop-table --add-locks --create-options --disable-keys --extended-insert --lock-tables --quick --set-charset. It gives a fast dump operation and produces a dump file that can be reloaded into a MySQL server quickly.

    Because the --opt option is enabled by default, you only specify its converse, the --skip-opt to turn off several default settings. See the discussion of mysqldump option groups for information about selectively enabling or disabling a subset of the options affected by --opt.

    --skip-extended-insert

    Turn off extended-insert

提交回复
热议问题