Skip to content

Instantly share code, notes, and snippets.

@hariadi
Last active August 29, 2015 13:56
Show Gist options
  • Save hariadi/8816008 to your computer and use it in GitHub Desktop.
Save hariadi/8816008 to your computer and use it in GitHub Desktop.
Re-sync MySQL Replication

Re-sync MySQL Replication

Do this command in all server. In this example I'm use 2 server master-master replication

MASTER

RESET MASTER;
SHOW MASTER STATUS\G;

SLAVE

STOP SLAVE;
RESET SLAVE;
CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=120;
START SLAVE;

To view status:

SHOW SLAVE STATUS\G;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment