Home  >  Q&A  >  body text

How to solve the problem of mysql master-master synchronization and slave database out-of-synchronization?

There are now 3 mysql instances mysql-m1 mysql-s1 mysql-m2

mysql-m1 and mysql-s1 are master-slave relationships. All operations in mysql-m1 will be synchronized to mysql-s1, and then I configured mysql-m2 and mysql-m1 as Master-Master relationship, inserting data into mysql-m2 will be synchronized to mysql-m1 but mysql-s1 is not synchronized (mysql-m1 and mysql-s1 are Master-slave relationship, right? Because the data synchronized by binlog will no longer be recorded in binlog, the slave database mysql-1 is not synchronized). Do I need to add a master-slave relationship between mysql-m2 and mysql-s1 to achieve the effect I want? Or is there another solution? Ask God for answers!

ringa_leeringa_lee2704 days ago715

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-05-24 11:35:07

    m1 can enable log_slave_updates. m2->m1->s1 is a cascade replication. Make sure to enable this parameter on the intermediate node

    reply
    0
  • 漂亮男人

    漂亮男人2017-05-24 11:35:07

    Replication transactions will also be written to the binary log. Please first confirm whether the synchronization of S1 has been interrupted.

    reply
    0
  • Cancelreply