MySQL Forums
Forum List  »  Replication

Re: Quick replication questions
Posted by: Rick James
Date: March 24, 2011 10:28PM

Dumping the slave back onto the master -- Sounds like a good and simple plan. It does require enough downtime (or at least no-write time) to take the dump. But you are stuck with that problem since you have only 2 machines.

I think --lock-tables does
LOCK TABLE tbl1;
SELECT * FROM tbl1;
UNLOCK TABLE tbl1;
LOCK TABLE tbl2;
...
This can lead to an inconsistent dump if
(1) two tables can be updated at the 'same' time; or
(2) you are trying to capture the binlog position

Q5 -- CHANGE MASTER to point the slave (freshly demoted) to point to the fresh binlog on the master (freshly reconstructed).

Q6 -- For security, the password should not be in my.cnf. Other things are pretty static and could do either place. Note: CHANGE MASTER can include only the things that are not otherwise set (either from my.cnf or because replication is running.) So...
* first time: perhaps only user & pwd
* reconnecting slave: perhaps only binlog file and POS.
(or something approximating that)

It feels like you have a good handle on Replication.

Options: ReplyQuote


Subject
Views
Written By
Posted
3449
March 22, 2011 12:38PM
1025
March 23, 2011 07:56PM
Re: Quick replication questions
873
March 24, 2011 10:28PM
870
March 25, 2011 06:52PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.