Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have 2 mysql 5.1.35 servers running in master/master mode. Due to a hardware failure, one of the nodes went offline for some time. Now, I need to do a full sync. I do not have the transaction binary logs to be able to just let the sync do by itself.

What are the proper procedures to bring the other node up to speed?

Thanks!

share|improve this question

migrated from stackoverflow.com Jul 31 '11 at 8:14

This question came from our site for professional and enthusiast programmers.

2  
"Gents"??? there are women here too –  sarah Jul 29 '11 at 20:13
    
@sarah I edited it out. –  Michael Jul 29 '11 at 20:14
    
is it safe to copy the /usr/loca/mysq/data/blah directories? Or do we want mysql to run through creating indexes, etc –  CMag Jul 29 '11 at 20:18
add comment

1 Answer

up vote 1 down vote accepted

You need to copy the entire Database to the fresh host.

You may copy the contents of the datadir, but you need to make sure the filesystem is consistent. Either stop the server, copy the files, start the server again. Or use locks and flushes.

On the running master find the current position of the binlog and then start the replication on the fresh master (as slave). Once the replica is on sync, start the second replica and bring the second master online.

A detailed documentation, including all the commands you need can be found here: http://dev.mysql.com/doc/refman/5.1/en/replication-howto.html

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.