Duplicate entry breaks replication

2004-09-02 Thread Alex Greg
Hi,
We recently moved to new servers, and also upgraded from MySQL 3.23 to 
4.0.20. We have one master database server and a second identical 
machine configured to replicate all databases from the master. 
Previously this has worked without a hitch, but we seem to be having 
some problems.

The way we did the transition was as follows:
1) On old database server, issued FLUSH TABLES WITH READ LOCK; command
2) Rsynced the data directory onto the new server (db1)
3) Locked the new database server
4) Rsynced the data directory onto the new server (db2)
5) Configured replication and started it up
This works, but we keep getting errors like Error 'Duplicate entry 
'53751556' for key 1' on query. Default database: 'archive'. I know 
what this means, but how come we are getting them if the two servers 
started off with an identical snapshot of data.

Also, should issuing an insert that fails in this nature break replication?
Regards,
-- Alex
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: Duplicate entry breaks replication

2004-09-02 Thread Victor Pendleton
Did you actually stop all writes to the master data while you were copying
the data over to the slave database? Is it possible that the connection you
issued the read lock with  timed out before the transfer was completed?

-Original Message-
From: Alex Greg
To: [EMAIL PROTECTED]
Sent: 9/2/04 10:56 AM
Subject: Duplicate entry breaks replication

Hi,


We recently moved to new servers, and also upgraded from MySQL 3.23 to 
4.0.20. We have one master database server and a second identical 
machine configured to replicate all databases from the master. 
Previously this has worked without a hitch, but we seem to be having 
some problems.

The way we did the transition was as follows:

1) On old database server, issued FLUSH TABLES WITH READ LOCK; command
2) Rsynced the data directory onto the new server (db1)
3) Locked the new database server
4) Rsynced the data directory onto the new server (db2)
5) Configured replication and started it up

This works, but we keep getting errors like Error 'Duplicate entry 
'53751556' for key 1' on query. Default database: 'archive'. I know 
what this means, but how come we are getting them if the two servers 
started off with an identical snapshot of data.

Also, should issuing an insert that fails in this nature break
replication?


Regards,


-- Alex

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