I am using mysqldump to take snapshots of the structure of a MySQL 5.0.77 database. I don't want the data, so I use the --no-data option.

If I use --single-transaction am I needlessly locking tables?

1 Answer 1


If you only want a dump of the schema there is really no point in using the --single-transaction option. This option is more useful towards obtaining consistent data from transactional tables. In fact, while using this option, the dump is still vulnerable to being corrupt if any of the following statements are executed: ALTER TABLE, CREATE TABLE, DROP TABLE, RENAME TABLE, TRUNCATE TABLE.

You can read more on the description for this option on the MySQL Documentation for 5.0.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.