Mysql – master-master replication or master slave replication

MySQLreplication

We have right now one server with a database.
A device and a website are accessing that database causing load

What I want is to create two servers master-slave where master databases are replicated to slave but slave have some databases that must not be in master database.

Is it possible to do it using master-slave replication or using master-master replication?

Best Answer

You do not want writes to be replicated from A to B then A better be slave of B, master.

again, to complicate things you can use master-master with replication filters but let's not get there if you do-not wish to.

That said, writing on slave is sort of risky business where you're going to "accidentally" write on databases being replicated from master and that's not good! As long as you're making sure you're only writing to slave-only databases it should be fine. You should choose to create dedicated users for such activity. You might also want to wonder: - What about backups of master data? - What about backups of slave data?

just saying... but yea to answer your question go with master-slave.