[ale] MySQL sync
Martha Armour
warnerharmer at yahoo.com
Fri Feb 21 09:57:04 EST 2003
One note about inserting records into the slave is
if you have an auto-increment field and create a
record
with let's say "302", and the master then sends over
its newly created "302", replication will break.
I've been using MySQL replication for two years in
a fail-over configuration. The computers are both
master/slave for each other; however, whichever
computer is running as a slave does not do any
inserting into the database.
- Martha
--- Chuck Huber <chuck at cehuber.org> wrote:
> On Fri, Feb 21, 2003 at 09:07:58AM -0500, cfowler
> wrote:
> > Chuck,
> >
> > Does this make the whole server a slave or just
> the database?
>
> The recipient database is the slave. But that
> doesn't mean you can't
> perform operations on it. For instance, you can
> still insert or delete
> rows, create tables and such. It's just that those
> operations are not
> reflected in the master. I use this to maintain an
> off-site copy of a
> production database. By policy, I consider it
> read-only.
>
> I might also mention that there's a series of
> commands in the mysql
> client that allow you to manipulate the replication
> process. In this
> architecture, it's the slave that's active, and
> pulls from the master.
> The master is passive in this sense. The additional
> functionalty that
> you implemented inthe master causes it to log every
> transaction and
> number it. The slave then connects up and says
> "What's your latest
> tran number?" It compares that to the slave's last
> fetch transaction
> number then says "Okay... gimmie everything since
> tran xxx". The master
> then spews its guts to the slave.
>
> Enjoy,
> - Chuck
>
> --
> "The purpose of encryption is to protect good people
> from bad people, not to protect bad people from the
> government."
> Scott McNealy, CEO Sun Microsystems
> "The best way for government to control people is to
> remain in
> a constant threat of war." ---Karl Marx
> "They that can give up essential liberty to obtain a
> little temporary
> safety deserve neither liberty nor safety." --
> Benjamin Franklin
>
> ATTACHMENT part 2 application/pgp-signature
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale
More information about the Ale
mailing list