How can i take my mysql database into Master Slave configuration for data backup and separation of inserts and selects

StackOverflow https://stackoverflow.com/questions/16984689

  •  31-05-2022
  •  | 
  •  

Frage

I have a huge database almost 5M records and its growing at a high speed. I have a Query for report generation which joins 4 tables and the time it takes is not pretty. I want to replicate my database on a slave instance and separate inserts and select. So when i select data it goes to master and on inserts goes to slave and replicates the data whenever either one is updated. Whats your suggestion on this.

War es hilfreich?

Lösung

In MySQL terminology, user insertions and updates are directed to the Master, such changes are then forwarded to the Slave (so it is the other way around).

If you want a bi-directional synchronisation, you will need to consider circular replication (here is a good tutorial).

The next step is clustering, but this is a bit more complex to handle.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top