faqts : Computers : Databases : MySQL : Common Problems

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

6 of 9 people (67%) answered Yes
Recently 6 of 9 people (67%) answered Yes

Entry

How can I lock an entire database or all tables?

Aug 30th, 2004 12:47
Ken S., Finbarr OMahony, http://dev.mysql.com/doc/mysql/en/FLUSH.html


FLUSH TABLES WITH READ LOCK;

Quote from the MySQL website:

"Closes 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 if you have a filesystem such as Veritas that can take
snapshots in time."
http://dev.mysql.com/doc/mysql/en/FLUSH.html