MySQL Forums
Forum List  »  Replication

Re: Replication down after disabling / enabling network card adapter
Posted by: Simon AAA
Date: April 09, 2014 04:26AM

Here are the changes I have done on the MySQL server :

Primary server :

server-id = 1
replicate-do-db = <your_database_name>
log-bin = mysql-bin
binlog-format=ROW
binlog-do-db = <your_database_name>

Secondary server :

server-id = 2
replicate-do-db = <your_database_name>
log-bin = mysql-bin
binlog-format=ROW
binlog-do-db = <your_database_name>

Here are the queries for the replication :

Primary server :

FLUSH TABLES WITH READ LOCK;
SHOW MASTER STATUS;
UNLOCK TABLES;
STOP SLAVE;

CHANGE MASTER TO MASTER_HOST='<secondary_serverip>',
MASTER_USER='<secondary_replication_user>',
MASTER_PASSWORD = '<secondary_replication_password>',
MASTER_LOG_FILE = '<secondary_file>',
MASTER_LOG_POS = <secondary_position>;

START SLAVE;

Secondary server :

FLUSH TABLES WITH READ LOCK;
SHOW MASTER STATUS;
UNLOCK TABLES;
STOP SLAVE;

CHANGE MASTER TO MASTER_HOST='<primary_serverip>',
MASTER_USER='<primary_replication_user>',
MASTER_PASSWORD = '<primary_replication_password>',
MASTER_LOG_FILE = '<primary_file>',
MASTER_LOG_POS = <primary_position>;

START SLAVE;

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.