Mysql

Fixing MySQL replication that is stuck

If your MySQL replication is stuck for example on CREATE / ALTER TABLE ... (or few others) because for example for the tables that already exist on the slave, there’s quick fix that can be applied on MySQL slave: SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; This will force slave to skip one command (that is causing it to stop) and then replication is started back again. Depending on the root cause of the problem of stopped replication there are other solutions – but this works in the case described above.