I have a master slave configuration for my production stage environment. Sometimes I need to write to some tables of my stage server i.e slave server. In that case conflicts occurs as content from both master and slave differs. So is there any option that for some particular tables if conflict occurs I want to give priority to the content of the tables in slave server. So that it will not be overridden by the data from master server.

Note: I am very new to database and devops. So please bear me and let me know if it is a noob question.

  • If you switched to a different configuration such as master-master or multi-master (MariaDB Cluster), then you'd be able to write to any node, but it would of course be replicated to the other node(s).
    – dbdemon
    Jan 26, 2019 at 13:06

1 Answer 1



The Master and the Slave should always (aside from a minor delay) have identical data. If they don't, you need to investigate and fix it. Else, things could get worse and worse.

Percona Tools has a tool to discover whether there are differences between Master and Slave, plus a tool to fix them for you. However, it assumes that the Master is the Master, not the Slave.

Is the Slave universally the "better"? Then consider "failing over" -- That is, make the Slave the Master and the Master the Slave. Now, your problem (as stated) goes away.

(Sorry, there are too many details to spell out details of all the steps you need in this Q&A.)

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.