Skip some column replication on slave in MySQL

I have an identical table on the master and subordinate. Both have many columns with priceamong them. Is it possible to set separate values ​​for a column pricein a slave so that replication does not overwrite them?

Our system works in many countries with individual prices, but we would also like to share some general data from a central database.

Although some solutions:

  • Extract all the columns of a particular country to other tables that will not be replicated. This will require significant changes in our source code.
  • Create a proxy database with only shared shared columns that will be replicated from the wizard, and then install it as a database in a country database with full column definitions. It seems ugly to me.

Is there something better? I would appreciate any help.

+3
source share
3 answers

I really don’t think that replication is for “near-replication”, as you ask. I do not think that you can only replicate a part of a table.

Your first decision seems most reasonable to me.

, , . , . - , .

(Me: MySQL, MySQL .)

0

Percona Server 5.1 slave-skip-columns. .

0

Source: https://habr.com/ru/post/1776245/


All Articles