Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

Mysql master-master replication

$
0
0

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.


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>