Create database dump without locking any tables


Creating a database dump can cause a lot of long living table locks. That might cause problems in an active system.


If you are running mysqldump, simply add --single-transaction and you'll not see a single lock. If you are using a transactional table engine like InnoDB you'll also make sure that it gets dumped in a consistent state.

mysqldump <mysqldump-options> --single-transaction 


Please sign-in to post a comment