Results 1 to 1 of 1
Thread: MySQL Replication Issue
Jun 2, 2008, 21:11 #1
- Join Date
- May 2008
- 0 Post(s)
- 0 Thread(s)
MySQL Replication Issue
I have mysql master database and 10 slave already running replication. I want to add a new mysql database server and want to enable replication on it. The thing is that i can't take dump of database from master because i don't want to block updates on MASTER & because of load issue. My database size is around 20GB which i want to replicate. I took database dump from one of the slaves and i followed the following steps.
mysql-slave> stop slave;
mysql-slave> show slave status;
mysql-slave> mysqldump database > database.sql
once it took the complete backup of database i started the slave again
mysql-slave> start slave;
Now in the mean time master contuniously updating the database. and it's changed it's log file and position.
mysql-master> show master status;
After that i switched to new mysql server where i want to enable replication.
mysql-new-slave> Restored mysql database
mysql-new-slave>CHANGE MASTER TO
-> MASTER_LOG_FILE='recorded_log_file_name (mysql-bin.00010)',
-> MASTER_LOG_POS=recorded_log_position (0020);
this is the information which i noted from the slave from where i got the dump of DB.
mysql-new-slave> start slave;
* Now the problem occurs immediately i am getting the 'Duplicate Entry Error' continuously.
* What i believe i am getting 'Duplicate Entry Error' because the time when i am taking dump because DB is almost 20 GB and it took 1/2 an hour for that and in the mean time it's continuously updating master and it's missed the log file between that time.
I don't know i am right or not. Please help me out and let me know what should be the problem ? Thanks in advance