mysqldump -u testuser -p testdb --skip-extended-insert > /tmp/backup_insert_each.sql
If you want to create one INSERT statement for each record during backup use the --skip-extended-insert option of the mysqldump utility.
Using the --skip-extended-insert option mysqldump writes INSERT statements using one-row syntax that includes only one record in one statement. This results in a bigger dump file and slows down inserts when the file is reloaded.
This can be useful if you want to compare different database dumps as in this case the diff result is more readable.
- Import an SQL file using the command line in MySQL
- Backup only certain rows from MySQL database
- Create INSERT statement for each record with mysqldump
- Backup MySQL database without locking tables
- Backup MySQL data only
- Skip tables in MySQL backup
- Backup only selected tables in MySQL
- Backup MySQL schema only
- Backup MySQL database