I found out that I can set
skip-errors=1062 in the
my.cnf but I need to know what happens to the row when the error happens. Does it get silently dropped? Or is that config option the equivalent to
STOP SLAVE;SQL_SLAVE_SKIP_COUNTER=1; START SLAVE;
Yes, it is equivalent, provided the slave error you are skipping is 1062 (Duplicate Key)
It would have to appear in the
[mysqld] section of my.cnf like this
All other error numbers will stop the SQL thread and would require
STOP SLAVE; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE;
to have replication conitnue
If you have multiple error numbers to skip, it should be a comma-delimited list of error numbers
For more information, please read the MySQL Documentation on it.
Does it get silently dropped?
Yes it does. Just remember that any non-key columns that were supposed to change will not change.