I have configured 2 MySQL server to do master-master replication. Below
is my config:
Node A
server-id               = 1
log_bin                 = mysql-bin
expire_logs_days        = 10
max_binlog_size         = 100M
binlog_do_db            = clustertest
binlog_do_db            = gateway
binlog_do_db            = reporting
binlog_do_db            = traffic
binlog_ignore_db        = mysql
binlog_ignore_db        = test
replicate-same-server-id = 0
log-slave-updates
auto-increment-increment = 10
auto-increment-offset    = 1

master-host               = 10.1.20.103
master-user               = replicator
master-password           = username
master-port               = 3306
replicate-do-db           = clustertest
replicate-do-db           = gateway
replicate-do-db           = reporting
replicate-do-db           = traffic



Node B
server-id               = 2
log_bin                 = mysql-bin
expire_logs_days        = 10
max_binlog_size         = 100M
binlog_do_db            = clustertest
binlog_do_db            = gateway
binlog_do_db            = reporting
binlog_do_db            = traffic
binlog_ignore_db        = mysql
binlog_ignore_db        = test
replicate-same-server-id = 0
log-slave-updates
auto-increment-increment = 10
auto-increment-offset    = 2

master-host               = 10.1.20.102
master-user               = replicator
master-password           = username
master-port               = 3306
replicate-do-db           = clustertest
replicate-do-db           = gateway
replicate-do-db           = reporting
replicate-do-db           = traffic


I restart MySQL daemon, and go to mysql shell and execute this on both
server:
Node A
flush tables with read lock;
show master status \G

Node b
stop slave
CHANGE MASTER TO MASTER_HOST='10.1.20.102', MASTER_USER='replicator',
MASTER_PASSWORD='password', MASTER_LOG_FILE='mysql-bin.000001',
MASTER_LOG_POS=98;
start slave

I went back to Node A and execute unlock tables;

Node B
flush tables with read lock;
show master status \G

Node A
stop slave
CHANGE MASTER TO MASTER_HOST='10.1.20.103', MASTER_USER='replicator',
MASTER_PASSWORD='password', MASTER_LOG_FILE='mysql-bin.000001',
MASTER_LOG_POS=98;
start slave

I went back to Node B and execute unlock tables;

After that I try to insert new record from Node A and I see Node B is
synchronized. But when I try to insert new record from Node B. I see
nothing change at Node A. What I missed here?



Willy



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to