MySQL Replication ignore few columns

master-master-replicationmulti-masterMySQLreplication

I have setup MySQL replication, is there a way to skip replicating one column or multiple columns from few tables?

Best Answer

Replicate it! Else you won't be able to failover to a Slave if the Master dies. Deal with access control in some of the following ways:

  • Use GRANT to restrict what each user can see.

  • Use VIEWs to avoid showing the sensitive columns.

  • Segregate the sensitive columns into other tables (vertical partitioning), so that the GRANT applies to tables instead of columns and VIEWs aren't needed.