how to make replication without taking master down
i have a production mysql server which can't be taken down even for one sec.
i know the basic step to make a replication, but i have trouble making
a consistent snapshot without taking down mysql server or do a READ
LOCK.
i dump my master DB with the following command(it uses innodb):
mysqldump -q -A -F --single-transaction --no-autocommit
--master-data=1 > test.sql
then rsync the test.sql to slave server,import it:
mysql < test.sql
then i tried to "start slave",soon after the slave try to catch up
with master,it runs into an duplicated key error. I've also tried to
dump the DB with "-B AAA BBB" instead of "-A",but it still ran into
the same error.
If I bring down the master server and do the same thing,i dont get any
error and sucessfully have the slave catch up with my master.
does any one have idea how to achieve the goal? thx a lot!
--
MySQL Replication Mailing List
For list archives: http://lists.mysql.com/replication
To unsubscribe: http://lists.mysql.com/replication?unsub=lists@pantek.com
Received on Thu Jul 19 11:31:21 2007
This archive was generated by hypermail 2.1.8
: Thu Aug 09 2007 - 19:30:25 EDT
|