Hi Brent,

Thanks for your response. There was no other application that was writing to
slave directly. I decided to sit down and track the IDs that were being
reported as duplicates. It seems this happens with tables starting at
auto_increment at 0. Slave doesnt get replicated with records corresponding
to 0 id. Instead it tries to insert to the next id. That was causing the
duplicate entry problems.

I first thought when master does a multi row insert to slave, its id
corresponding to each record can change, or get shuffled, depending on the
order in which it gets inserted. Thanks for your advise.

On Sun, Apr 20, 2008 at 11:01 AM, Brent Baisley <[EMAIL PROTECTED]> wrote:

> If you are getting duplicate id's on the slave, then something is not
> setup correctly. The save should have the same ids as the master. Just
> because a field is auto-increment, doesn't mean you can't enter you own
> value. Think of auto-increment as a default value setting.
>
> Just because a database is setup as a slave, that doesn't mean you can't
> use it like a typical database. You can insert, delete, update, etc. just
> like any other DB. Something or someone is likely adding records directly to
> the slave, which is then generating it's own auto-increment value.
>
> Brent Baisley
> Systems Architect
>
>
>
> On Apr 18, 2008, at 11:36 AM, Chanchal James wrote:
>
>  Hi,
> >
> > Has anyone got mysql master-slave replication setup on v4.1. Were you
> > able
> > to get tables with auto_increment update properly to slave ?
> > If yes, please let me know. I need some advise on how to set it up to
> > work
> > well. I get stuck at duplicate errors quite often, and those are not
> > real
> > duplicates, its just that its id on slave was already occupied by some
> > previous entry!!
> >
> > I see mysql 5 has options like: auto-increment-increment &
> > auto-increment-offset , but with v4.1
> >
> > Any help is appreciated.
> > Thanks!
> >
>
>

Reply via email to