I have a production database with master-slave replication being done on it. Production DB backups are done off of the slave server.
I'd like to make it so that an arbitrary number of development environments can be replica's of the slave. The problem is that, whereas the slave server has nothing writing to it, the dev servers might. Like even just logging in through the web interface to the dev site could trigger an INSERT into a loginLog table or some such, which could cause the slave replication to stop with errors like this:
Could not execute Write_rows event on table dbname.tablename; Duplicate entry '15610534' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log bin-log.000829, end_log_pos 8209872
My question is... is it possible to setup a slave DB such that when conflicts are found that the master DB's data overwrites the slave DB's data?
The advantage of this would mean that developers could have access to real time data in a development environment. Like if a developer is developing some sort of real time report on sales (eg. a "leader board") this real time data could be useful.