I've set up a MySQL replication scheme between 2 remote databases. I've realized that if I change data on the slave DB, the changed data does not get updated again.
For example, I have a table User and I create a new user Joe on the Master DB. Joe is replicated on the slave DB. But if I delete Joe on Slave DB later, the Joe on the Master is not copied back to the slave again.
Why is this happening? Is there a way to stop this?
This happens because MySQL replication doesn't work the way you think it does. All it does is take the queries that changed data on the master and re-run them on the slave. There is no ongoing reconciliation of changes.
The upshot of this is that you must treat slaves as read-only, and never modify the data on them. Whatever you want to achieve by modifying the slave data, you'll have to come up with a different way of achieving it.