I got some backup server where the database is configured as slave. On each server there is a program that querye the mester and if it in not responding one of the slave configure itself as a master. I should consider that is possible there is a mistake in my program which cause and extra insertion of recards during transition time ( I have to investigate on that ). What is not clear is that when I removed the extra record from slave , after a while the same record is record in the slave more than once because I found again the error 10062 ' duplicate key'. I wondering if there is some way to reset the relay cache ( reset slave seems not good ) and more than that I wondering about a way to skip at run-time the sql statement which the slave refused. I tried also to use the variable sql_slave_skip_counter , but also this way seems not good, or I use it badly , I hope.
-----Messaggio originale----- Da: Atle Veka [mailto:[EMAIL PROTECTED] Inviato: mercoledi 28 dicembre 2005 20.47 A: AESYS S.p.A. [Enzo Arlati] Cc: mysql@lists.mysql.com Oggetto: Re: what about slave_skip_errors variables Are you saying that "from time to time it happens that data gets inserted directly to the slave"? In other words, they are NOT inserted into the master. Have you looked into using this mysqld option, which prevents accidental slave updates? --read-only Make all tables readonly, with the exception for replication (slave) threads and users with the SUPER privilege It's hard to say what happened when you told mysqld to skip the error. What are your mysqld versions? Atle - Flying Crocodile Inc, Unix Systems Administrator On Tue, 27 Dec 2005, AESYS S.p.A. [Enzo Arlati] wrote: > > Hi, > I got some mysql server connectet with the replica enabled and from time to > time it appen that the replicated data are still be inserted in the slave, > so the replication server stop working due the duplicate entry error. > For my purpose there is no matter to ignore these errors so I try to use the > parameters --slave_skip_error=1062 in configuration my.ini file . > I restart the server but the slave replication continue to stop for error, > what is changed is that now didn't report the cause of the error. > There is something wrong in all that and I don't known if it is a some of my > mistake in the way I'm using this command or some other problem. > I didn't known how to solve the problem, if someone can help, I'm just > waiting.... > regards, Ezno > > > ********************************** > ** with slave-skip-errors = off ** > ********************************** > 051227 16:57:43 [ERROR] Slave: Error 'Duplicate entry '7325' for key 1' on > query. Default database: 'pmv_manager'. Query: 'INSERT INTO log_st IDROW, > ......... , DT_MOD) values ( 7325, ..., current_timestamp )', Error_code: > 1062 > > > *********************************** > ** with slave-skip-errors = 1062 ** > *********************************** > 051227 17:07:36 [Note] Slave SQL thread initialized, starting replication in > log 'pmv_manager_log_bin.000069' at position 743, relay log > '.\enzo4-relay-bin.041541' position: 9336 > 051227 17:07:36 [Note] Slave SQL thread exiting, replication stopped in log > 'pmv_manager_log_bin.000069' at position 743 > > > -- 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]