mikhailian.mova.org

Faster Mysql dump and restore

Updated 2026-06-17
Faster Mysql dump and restore

It's surprising how many people do not know that their mysql dumps and restores can be faster if they disable autocommits.

Dump

mysqldump mydb --single-transaction >mydb.sql

Restore

(echo "SET autocommit=0; cat  mydb.sql; echo "COMMIT;") | mysql mydb