GET 24/7 LIVE HELP NOW

Announcement

Announcement Module
Collapse
No announcement yet.

Replication Setup

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

  • Replication Setup

    Hi All,

    I am new to this forum, and relatively new to MySQL, but have been a DBA for over 15 years with other DB's.

    I am trying to setup servers for a new product, and we have limited time to do this, so not much time to experiment.

    We want to have two masters running Percona 5.5 and a slave also running percona 5.5. We will set this up using MMM and this bit should be OK.
    However, we have another legacy database that needs to be replicated into one of the masters, which is running MySQL 5.1, and I only want to replicate some of the tables.

    What would be the best way to replicate this data? (Needs to be real time)


    Mike Taylor
    DBA Consultant
    Oracle, MySQL, SQL Server, PostgreSQL and more!

  • #2
    I see red flags everywhere. If you don't know how to do this medium-complexity task, then I have some advice -- and later I will not hesitate to say "I told you so" when you lose all of your data:

    STAY THE HELL AWAY FROM MMM. RUN FOR YOUR LIFE.

    If you are an *expert* in MySQL replication, then I won't argue if you say "I know what I'm doing and I'm using MMM in a way that won't destroy my entire system." But you've said you are new to MySQL, so please see the previous paragraph.

    Comment


    • #3
      xaprb wrote on Wed, 01 February 2012 13:54
      then I have some advice -- and later I will not hesitate to say "I told you so" when you lose all of your data:

      STAY THE HELL AWAY FROM MMM. RUN FOR YOUR LIFE.
      OK, thanks for that, so how do I do this without MMM?
      I still need to find some way of doing this, although now not so urgently, as we have decided to run with one master and two slaves for the new product, and use the master as a slave to the old product database, just replicating a few tables.

      Mike Taylor

      Comment


      • #4
        It's not exactly clear to me what replication topology you're trying to create, but it looks like you might be trying to violate the rule that a server can have only one master.

        Comment


        • #5
          Baron

          we have an application that contains our client information, call that database A.
          We have a new application, call that database B.
          We want to replicate database B to a secure site, call that slave database C.
          We need to run queries on data that is for current client information, in the new application.
          What I wanted to do is to replicate a set of tables from database A into database B, whilst replicating all of this to Database C.
          Doesnt seem that difficult to me, in my head, and in fact I have done this sort of thing before using Oracle Advanced Replication on Oracle 7 over 10 years ago. I just wanted to know if it can be done on MySQL or Percona.

          Mike

          Comment


          • #6
            It isn't so difficult in MySQL either.

            If there are only a couple of specific tables that you want to replicate then use a couple of replicate-do-table statements in the config on server B. That way you choose which tables you want to replicate into server B.
            Eg:
            replicate-do-table=yourDatabase.someTable
            replicate-do-table=yourSecondDatabase.someOtherTable
            ...

            And you also need to configure log-slave-updates on server B to forward the data received from server A since this is not on by default.

            So basically:
            ServerA: Normal master config
            ServerB: Special config in middle, Slave to A, replicate-do-table, log-slave-updates
            ServerC: Normal slave config

            Comment

            Working...
            X