user456064
user456064

Reputation: 187

Mysql master-master replication

I am trying to replicate my two instance of mysql databases located in different location. Till now I am successful in replicating the databases. But suppose when one server is temporarily down, it stops sending its data to slave whereas another keeps on sending its data. This creates two different sets of database instances. Is it possible to replicate the data from where it has been stopped. This is my setup for replication: Server 1:

server-id   = 1
replicate-same-server-id=0
auto-increment-increment=2
auto-increment-offset=1

mysql> CHANGE MASTER TO MASTER_HOST='192.168.x.x', MASTER_USER='abcd', MASTER_PASSWORD='password', MASTER_LOG_FILE="mysql-bin.000003", MASTER_LOG_POS=98;

Server 2:

server-id   = 2
replicate-same-server-id=0
auto-increment-increment=2
auto-increment-offset=2

mysql> CHANGE MASTER TO MASTER_HOST='192.168.x.x', MASTER_USER='abcde', MASTER_PASSWORD='password', MASTER_LOG_FILE="mysql-bin.000004", MASTER_LOG_POS=198;

Is there any way to continue the replication from where it has been stopped.

Upvotes: 1

Views: 1198

Answers (2)

Stony
Stony

Reputation: 3624

I also encounter the issue. After I change to ROW mode, the issue is gone.

[mysqld]
server-id=1
log_bin=mysql-bin
binlog_format=ROW

Upvotes: 0

jfly
jfly

Reputation: 7990

try 'stop slave; reset slave; start slave;'

Upvotes: 0

Related Questions