1

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.

4

2 回答 2

0

尝试'停止奴隶; 重置从机;启动奴隶;'

于 2013-08-29T04:08:49.783 回答
0

我也遇到这个问题。在我更改为 ROW 模式后,问题就消失了。

[mysqld]
server-id=1
log_bin=mysql-bin
binlog_format=ROW
于 2015-10-08T08:53:48.617 回答