ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Live Backups of MySQL Using Replication
Subject:   Lock tables
Date:   2007-12-19 17:54:06
From:   baysky
Instead of setting max_connections to 0 and kill sessions.
You could issue
FLUSH TABLES WITH READ LOCK;


to luck tables and in seperate screen do mysqldump.


Don't close out the session you issued FLUSH until dump is done. The lock will be released if session end.


The command to resume write is
UNLOCK TABLES;