MySQL Replication Resync

MySQL Replication Resync

Instructions on how to resync a MySQL slave/master replication.

 

 

I noticed that replication had stopped on my slave server with the error;

Slave_SQL_Running: No

Normally means that your slave has lost contact with your master and the log files that it uses to sync are behind - it's confused!

Pretty simple to fix. Run the commands below on the mysql shell of each server;

At the MASTER;

SHOW MASTER STATUS;

Copy the values of the result of the last command somewhere (MASTER_LOG_FILE and MASTER_LOG_POS).

At the SLAVE;

STOP SLAVE;

RESET SLAVE;

CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=98; (<- change to your values!)

START SLAVE;

SHOW SLAVE STATUS \G;

Done! You should now see the updated log files and positions.

How To Configure vsftpd Ubuntu
Sierra REST API
 

Comments

No comments made yet. Be the first to submit a comment
Already Registered? Login Here
Guest
October 31, 2020

Captcha Image

By accepting you will be accessing a service provided by a third-party external to https://www.johnnyshongo.com/