(still catching up, sorry about the old issues) Don't know what version is being used here, but one thing you might want to use, if you're just going to skip the errors anyway (hopefully you understand WHY you're getting them), is to start replication with the
--slave-skip-errors option -- you can skip only the errors you want or all errors. See: http://dev.mysql.com/doc/refman/5.1/en/replication-options.html I'd recommend getting replication up to speed with the slave-skip-errors option, then stopping the slave, taking out that option, so that new errors will show up. (we've done this when adding a new slave server to our system -- we don't quite have a snapshot of a database as a backup, just use mysqldump and lock each database individually, so our 3 db's are out of sync. We start replication at the earliest point, so some records are already in the db. Once the slave is current, we stop it, change the slave to show us all errors, and start replication again. The ideal solution is to implement point-in-time backups, which I'm working on currently.) Leo, your solution is dangerous because you're suggesting that commands to the master be sent as "insert ignore into" or "replace into" which is probably not the desired result (the commands from the master are sent to the slave, so you'd have to use those commands on the master). I'm also going to guess that the original poster did not lock all tables for the duration of the backup, getting a *snapshot* backup of the database, and that's why the replication errors happened. -Sheeri On 12/30/05, Leo <[EMAIL PROTECTED]> wrote: > other than what Gleb says, > you can avoid the error using 'insert ignore into' or better yet > 'replace into' > for every insert statement > > AESYS S.p.A. [Enzo Arlati] wrote: > > >I'm trying to use teh parameter sql_slave_skip_counter at run-time to > >restore slave replication. > >When a slave replication broke due some errors in code, my be a duplicate > >key, the only working way to restore the replica where to delete the > >existing record which conflicts whith the ones inserted by the replication > >process. > >So if I have a duplicate key 30020 ,I have to remove the record with the id > >30020 and the replication can reinsert it's copy of record with id = 30020. > >This should be difficult to automate so I try another way using the global > >variable sql_slave_skip_counter. > > > >I try to skip 5 records using a statemente like this: > >set global sql_slave_skip_counter = 5; > >and then restart the slavre > >start slave; > > > >but the problem is the same and the command 'show slave status' report a > >skip_counter filed equals 0. > > > >Where I am wrong , some can help me ? > >Regards, Enzo > > > > > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]