Link to home
Start Free TrialLog in
Avatar of CCVOIP
CCVOIP

asked on

how to set mysql replicate only for inserts only and not updates

Is there any way to set Mysql replication just for inserts in the slave and not updates or deletes.
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Replication between servers in MySQL is based on the binary logging mechanism.
=> hence, replication cannot be limited to only inserts, it is then not called "replication" anymore
what is the idea behind this request?
You could have a trigger perform on insert.  But this wouldn't be true replication.  But it could push the data to another server upon an insert event.
Avatar of CCVOIP
CCVOIP

ASKER

the idea behind it is that at some point I want to delete some data within the production server without  affecting the data in the replica server
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CCVOIP

ASKER

Got it, thanks for your advise.