Add this in your my.cnf slave file:

slave-skip-errors = 1062

Marc.

-----Message d'origine-----
De : Georg Horn [mailto:[EMAIL PROTECTED]
Envoyé : mercredi 21 avril 2004 17:31
À : [EMAIL PROTECTED]
Objet : Replication problem


Hi,

i'm new to this list, but i use mysql for years an are very happy with it.
However, today i ran into a problem that i couldn't find a solution for:

I set up database replication with a master and one slave, and it works
fine so far. I rewrote my application (web based written in php) so that
it executes all queries that insert, delete or update rows are executed
on the master, and all other queries on the slave. Fine.

But what, if the master fails? I want users to be able to continue working
on the slave, and this works fine for webpages that just do select statements.
I thought that, in case of the master being down, i could execute all
data-modifying queries on the slave, and also store these queries in a special
table or file, and re-execute them later on the master if the master becomes
available again. The problem is, that i then may get "Duplicate entry ... for
key ..." errors on the slave, if a record was already inserted into a table
with unique keys, and that the sql-thread on the slave then exits.

Is it possible to make the slave ignore such errors (i found no option for this
in the docs) and just stupidly continue replication, or does anyone have a
better idea how to set up such a scenario?

Bye,
Georg


-- 
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]

Reply via email to