Announcement

Announcement Module
Collapse
No announcement yet.

Master - Slave Replication on specific rows of table

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Master - Slave Replication on specific rows of table

    This question may not be related to Percona but for sure related to MySQL.

    I am a not an expert in MySQL world and looking for a solution like


    I have a table for example:

    issue_table
    =============
    id, issue_from, details
    1, machine1, "some details"
    2, machine1, "some details again"
    3, machine2, "some details"
    4, machine2, "some details"

    Is it possible to setup a master slave replication where, where I can
    filter what data goes to which slave? In simple terms, after
    replication I would like something like:

    slave1.issue_table
    ===============
    id, issue_from, details
    1, machine1, "some details"
    2, machine1, "some details again"

    slave2.issue_table
    =================
    id, issue_from, details
    3, machine2, "some details"
    4, machine2, "some details"

    Is replication the right tool to do this kind of work? Or there is a
    better design to handle such problems.
    I have read something that it is possible only by partitioning the table in the older versions of MySQL.
    Is there any advancement in latest versions of MySQL ( 5.6 or 5.7 ) for such kind of replication.

    Even a pointer to the right tutorial/document would be helpful.

  • #2
    I don't think there is any available option ready in MySQL to achieve similar goal.
    But I think you may be interested in Shard-Query:
    https://github.com/greenlion/swanhar...arding_Support

    Comment

    Working...
    X