Hi
The question you have asked have a very simple solution. It's not that hard to lock an entire database. Just do this, Go to the MySql shell and use the FLUSH command. This command will close all the open tables and lock all the tables from the database. It will only read until you execute the UNLOCK TABLE command. I think this is a very convenient way to take a database backup.
Code:
FLUSH TABLES WITH READ LOCK;
/* alternatively lock a single table:
LOCK TABLES customers READ;
*/
/* running my backup */
UNLOCK TABLES;
Bookmarks