2

I got MySQL Master-Slave replication running on 1 master with 2 slaves. SHOW MASTER STATUS / SHOW SLAVE STATUS says they are in sync, but databases have been created on the slaves and filled with data which of course cannot be seen on the other slaves/master, because no replication from Slave to Master happened.

Is there an easy way to fix this situation? Two outcomes would be acceptable for me, but I'm not sure what is the best way to achieve this (sorry, DBA noob):

  • No replication at all, but no data lost on each server in its current state (replicated data stays in its current state, new data on the slave stays there, too)
  • Converting Master-Slave to Master-Master-Replication so every server has the same data.

1 Answer 1

3

You say:

databases have been created on the slaves and filled with data.

The easiest way of correcting this is to take a mysqldump of the specific databases on the slave, drop the database on the slave, and import the dumpfile onto the master. The slaves will then replicate the data.

This of course gets trickier if it is not whole databases or even tables (but specific rows inside a table).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.