Friday, December 14, 2007

How to Issue an SQL to all MySQL Database without Replication

Here's the replication structure: 1 master, 5 slaves under it, each slaves have another 5 slaves under it.

Here's the problem: What if you have to update a couple of big tables and you know that if you apply it to the master that it will take a long time to replicate? What can you do?

Here's the solution: Run the update queries on each database by turning off replication. This can be done by running the command below.

set SQL_LOG_BIN = 0;

No comments: