We have a master-master replication setup for one of our databases. Some automated backup software will issue a “FLUSH TABLES” command before commencing with a backup, but this command gets replicated to the other DB server. When a certain set of conditions occurs that includes a write query to a table, there seems to be a dead-lock condition that results which causes more queries to be unable to either read or write.
To alleviate this situation, is it possible to exclude all “FLUSH TABLES” commands from being replicated to a MySQL slave?
Try something this on the Master in a single DB session to see if this helps:
This prevents the
FLUSH TABLES;command from entering into the binary logs on the Master. Therefore,FLUSH TABLES;should never see the light of day on the Slave.