Quantcast
Channel: Mysql master-master not replicating - Server Fault
Viewing all articles
Browse latest Browse all 3

Mysql master-master not replicating

$
0
0

I'm setting up a master-master mysql replication on two servers (db1 and db2). I started with setting up db2 as a slave to db1 and that works fine. But when I set up db1 as a slave to db2 it isn't replicating.

On the face of it everything looks fine but the data isn't replicating. There are no errors in either of the error logs. The slave status is updating the bin log position. I have used mysqlbinlog to examine both the binlog on the db2 and the relay log on db1 and all of the queries are going in there, but not being executed to db1.

"show slave status" on both servers shows that both the slave io and sql threads are "Yes" and that the relay log position is updated by the sql thread.

Also on both servers:

>echo "show processlist" | mysql | grep "system user"166819 system user NULL Connect 3655 Waiting for master to send event NULL166820 system user NULL Connect 3507 Has read all relay log; waiting for the slave I/O thread to update it NULL

Relevant config for db1:

server-id = 1log-slave-updatesreplicate-same-server-id = 0auto_increment_increment = 4auto_increment_offset = 1master-host = db2master-port = 3306master-user = slaveusermaster-password = ***skip-slave-startsync_binlog = 1binlog-ignore-db=mysql

Config for db2

server-id = 2log-slave-updatesreplicate-same-server-id = 0auto_increment_increment = 4auto_increment_offset = 2master-host = db1master-port = 3306master-user = slaveusermaster-password = ***sync_binlog = 1relay-log=mysql-relay-binbinlog-ignore-db=mysql

What else can I look for to make sure db1 executes the queries from db2?


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images