Last active
August 29, 2015 14:14
-
-
Save jamesattard/1eda1e43f0111f46449c to your computer and use it in GitHub Desktop.
MySQL Replication Skip "Duplicate Error"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| while [ `mysql -e "show slave status" | grep -c "Error_code: 1062"` -ge 1 ]; do | |
| `mysql -e "SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE"` | |
| echo -n "."; sleep 1 | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment