Lock an entire mysql database with all its tables
16 comments. Current rating: (6 votes). Leave comments and/ or rate it.
Question:How can I lock my entire mysql database? And how can I lock a single table?
Answer:Go to the mysql shell and use the FLUSH command.
This clloses all open tables and locks all tables for all databases with a read lock until you execute UNLOCK TABLES. This is very convenient way to get backups.