Skip to content

Instantly share code, notes, and snippets.

@Justintime50
Created March 24, 2022 18:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Justintime50/3e031ed884fdcac04914add1bed4d09b to your computer and use it in GitHub Desktop.
Save Justintime50/3e031ed884fdcac04914add1bed4d09b to your computer and use it in GitHub Desktop.
Reset your MySQL Replication

Resetting MySQL Replication

If you have a master/slave replication setup that comes across something similar to error 1236 where the binlogs get out of sync, you can run the following commands to get things back on track.

# On the master node
SHOW MASTER STATUS;

# On the slave node
STOP SLAVE;
CHANGE MASTER TO
MASTER_LOG_FILE='mysql-bin.123456',
MASTER_LOG_POS=123456789;
START SLAVE;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment