2

Due to Disk space issue Master2 server crashed and it was rebuilt again using mysqldump of Master1. Both Master 1 and Master2 are in sync and Master2 is in Read_only mode. During the crash, I stopped the Slave instance in Master1 and it's been over a week now. Now how to restart replication from Master2 to Master1. Can changing the Master Log position in Master1 to current Master2 status works?

1 Answer 1

0

As Master2 is in read-only;

Master2: SHOW MASTER STATUS

Master1:

CHANGE MASTER TO
MASTER_HOST = 'host_name'
MASTER_USER = 'user_name'
MASTER_PASSWORD = 'password'
MASTER_LOG_FILE = 'master_log_name'
MASTER_LOG_POS = master_log_pos;

START SLAVE;

Where the master log file name/pos are from the Master2 SHOW MASTER STATUS

The rapidly changing master status isn't an issue as its binary logs are from Master1 anyway. Master1 won't write its own binary log message back again when received via replication.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.