Announcement

Announcement Module
Collapse
No announcement yet.

Exclude a database

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

  • Exclude a database

    Hi,

    How can I exclude a database from the replication ?

    Thx

    Best regards

    Azigui

  • #2
    Hi,

    Bit confused. Are you asking about PXC (master-master replication) or native MySQL Replication? Can you explain the scenario?

    If you are asking for native MySQL Replication than there are 2 ways to exclude a database from the replication.

    1. You can exclude it from master by replicating specific DBs which you want through "binlog-do-db" command
    (But, this is not recommended. Please check below post)
    http://www.mysqlperformanceblog.com/2009/05/14/why-mysqls-bi nlog-do-db-option-is-dangerous/

    2. You can exclude it on slave by adding option "replicate-wild-ignore-table=db.%" in my.cnf

    Comment


    • #3
      Azigui,

      If you were referring to Percona XtraDB Cluster's replication, then no, it's actually not yet possible to do so. Galera replication doesn't support yet local schemas or tables. The only thing you could do for local tables is to convert them into a different engine like myisam for example (if you don't enable its support in your cluster).

      Regards,

      Comment


      • #4
        Hi Niljoshi,

        Thx for your response
        I add this option in the [MYSQLD] section in only my 2 slaves but without success

        Can you explain me why

        Best regards

        Comment


        • #5
          Hi,

          It's ok is replicate database, table and structure but no records.
          Is it possible not replicate database, table and structure.

          Thx

          Comment


          • #6
            Hi lefred,

            For your information, you can replicate database in myisam since 5.5.24 version of PXC

            Best regards

            Comment


            • #7
              Really ? *joking*

              I know but this needs to be enabled so, currently it's the only way to have local tables in PXC nodes.

              Cheers,

              Comment


              • #8
                Ok, I agree with you but I need to enable because I have myisam tables need to replicate

                Comment

                Working...
                X