0

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!

3
  • 2
    "Gents"??? there are women here too
    – sarah
    Jul 29, 2011 at 20:13
  • @sarah I edited it out.
    – Michael
    Jul 29, 2011 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, 2011 at 20:18

1 Answer 1

1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .