title: Replicate Multiple Database to Single Database AND conversely
body: <p>Here is my Master-Master Replication Scenario</p>
  
  <pre><code>-------------------
  | Master/Slave 1  |
  | Database = MainDB |
  -------------------
  /\
  |
  |
  |
  \/
  -------------------
  | Master/Slave 2  |
  | Database = DB1  |
  | Database = DB2  |
  | Database = DB3  |
  -------------------
  </code></pre>
  
  <p>Here is my Master/Slave1 Configure:</p>
  
  <pre><code>[mysqld]
  binlog_format                   = MIXED
  user                            = mysql
  port                            = 3306
  socket                          = /tmp/mysql.sock
  #bind-address                    = 127.0.0.1
  basedir                         = /usr/local
  datadir                         = /var/db/mysql
  tmpdir                          = /var/db/mysql_tmpdir
  slave-load-tmpdir               = /var/db/mysql_tmpdir
  secure-file-priv                = /var/db/mysql_secure
  log-bin                         = MainDB.log
  replicate-do-db                 = MainDB
  replicate-rewrite-db            = "DB1-&gt;MainDB"
  replicate-rewrite-db            = "DB2-&gt;MainDB"
  replicate-rewrite-db            = "DB3-&gt;MainDB"
  replicate-rewrite-db            = "DB4-&gt;MainDB"
  log-output                      = TABLE
  master-info-repository          = TABLE
  relay-log-info-repository       = TABLE
  relay-log-recovery              = 1
  slow-query-log                  = 1
  server-id                       = 1
  </code></pre>
  
  <p>and my Master/Slave2 Configure:</p>
  
  <pre><code>[mysqld]
  binlog_format                   = mixed
  user                            = mysql
  port                            = 3306
  socket                          = /tmp/mysql.sock
  #bind-address                    = 127.0.0.1
  basedir                         = /usr/local
  datadir                         = /var/db/mysql
  tmpdir                          = /var/db/mysql_tmpdir
  slave-load-tmpdir               = /var/db/mysql_tmpdir
  secure-file-priv                = /var/db/mysql_secure
  log-bin                         = mysql-bin
  log-output                      = TABLE
  master-info-repository          = TABLE
  relay-log-info-repository       = TABLE
  relay-log-recovery              = 1
  slow-query-log                  = 1
  server-id                       = 2
  log_bin                         = cloud.log
  binlog-do-db                    = DB1
  binlog-do-db                    = DB2
  binlog-do-db                    = DB3
  binlog-do-db                    = DB4
  </code></pre>
  
  <p>With this configuration I can replicate from Master/slave2 to Master/slave1 but it can't replicate conversely. 
  How cloud change my.cnf for both to be replicated together?</p>