<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:m =
"http://schemas.microsoft.com/office/2004/12/omml"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16608" name=GENERATOR>
<STYLE>@font-face {
        font-family: Cambria Math;
}
@font-face {
        font-family: Calibri;
}
@page Section1 {size: 612.0pt 792.0pt; margin: 72.0pt 72.0pt 72.0pt 72.0pt; }
P.MsoNormal {
        FONT-SIZE: 11pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Calibri","sans-serif"
}
LI.MsoNormal {
        FONT-SIZE: 11pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Calibri","sans-serif"
}
DIV.MsoNormal {
        FONT-SIZE: 11pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Calibri","sans-serif"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.EmailStyle17 {
        COLOR: windowtext; FONT-FAMILY: "Calibri","sans-serif"; mso-style-type: personal-compose
}
.MsoChpDefault {
        mso-style-type: export-only
}
DIV.Section1 {
        page: Section1
}
</STYLE>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=EN-GB vLink=purple link=blue>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2></FONT> </DIV><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B>
mailscanner-bounces@lists.mailscanner.info
[mailto:mailscanner-bounces@lists.mailscanner.info] <B>On Behalf Of </B>Jason
Ede<BR><B>Sent:</B> Friday, February 22, 2008 7:00 AM<BR><B>To:</B>
MailScanner discussion<BR><B>Subject:</B> OT: bayes in MySQL with
replication<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal>(sent 2ce as I think it was blocked first time due to
random binary characters)<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>I know this is way off topic, but I’m guessing others have
had this and have solved it...<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>Since our 2 mail servers are on different sites and the VPN
between them hasn’t been overly reliable I’ve been trialling the bayes in
MySQL with Master – Master replication. (MySQL 5.0)<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>This seems to work fine for a few hours and I then
get...<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>080222 10:38:07 [ERROR] Slave: Error 'Duplicate entry
'<random binary>' for key 1' on query. Default database: 'sa_bayes'.
Query: 'INSERT INTO bayes_token<o:p></o:p></P>
<P
class=MsoNormal>
(id, token, spam_count, ham_count, atime)<o:p></o:p></P>
<P
class=MsoNormal>
VALUES ('1','<random binary>','0','1','1203675610')', Error_code:
1062<o:p></o:p></P>
<P class=MsoNormal>080222 10:38:07 [ERROR] Error running query, slave SQL
thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE
START". We stopped at log 'mysql-bin.000006' position 8791360<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>and SQL replication stops. Is there any way of avoiding
this or of specifying a default action in case of a clash like
this?<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>Currently each mailserver connects to the local copy of the
database.<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P>
<P class=MsoNormal>Jason<o:p></o:p></P>
<P class=MsoNormal><o:p> </o:p></P></DIV>
<DIV><BR><SPAN class=953445014-22022008><FONT face=Arial color=#0000ff
size=2>[Rick Cooper] </FONT></SPAN></DIV>
<DIV><SPAN class=953445014-22022008></SPAN> </DIV>
<DIV><SPAN class=953445014-22022008><FONT face=Arial color=#0000ff
size=2>Add</FONT></SPAN></DIV>
<DIV><SPAN class=953445014-22022008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=953445014-22022008><FONT face=Arial color=#0000ff
size=2>slave-skip-errors = 1062</FONT></SPAN></DIV>
<DIV><SPAN class=953445014-22022008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=953445014-22022008><FONT face=Arial color=#0000ff size=2>To
your mysql config file under the [mysqld] section. that line says skip
duplication errors, you might even want slave-skip-errors = 1053,1062 (skip
master shutting down and data duplication errors)</FONT></SPAN></DIV>
<DIV><SPAN class=953445014-22022008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=953445014-22022008><FONT face=Arial color=#0000ff size=2>Look
here for other replication config options that might interest
you</FONT></SPAN></DIV>
<DIV><SPAN class=953445014-22022008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=953445014-22022008><FONT face=Arial color=#0000ff size=2><A
href="http://dev.mysql.com/doc/refman/5.1/en/replication-options.html">http://dev.mysql.com/doc/refman/5.1/en/replication-options.html</A></FONT></SPAN></DIV>
<DIV><SPAN class=953445014-22022008><PRE><CODE></CODE> </PRE> </SPAN><BR>-- <BR>This message has been
scanned for viruses and <BR>dangerous content by <A
href="http://www.mailscanner.info/"><B>MailScanner</B></A>, and is
<BR>believed to be clean. </DIV></BLOCKQUOTE></BODY><br />--
<br />This message has been scanned for viruses and
<br />dangerous content by
<a href="http://www.mailscanner.info/"><b>MailScanner</b></a>, and is
<br />believed to be clean.
</HTML>