red_valsen <red_valsen (AT) yahoo (DOT) com> wrote:
Quote:
Now that I've set up a replicating master/slave pair across hosts, I'm
told that I'll have to periodically drop the master database and
reload it from a mysqldump. |
Aha. Why?
Quote:
The assumption is that the slave will automagically pick up the change. |
Yes, it will.
Quote:
I haven't
done this before with MySQL, but working by analogy from other DBMSes
suspect it will mean having to STOP SLAVE and reload the same dump
file on the slave host -- in effect, re-initializing replication. Is
this correct? |
No, it's not.
mysqldump creates a (rather big) bunch of DDL and DML SQL statements.
Loading a dump means executing those statements. Replication will
handle this just like any other SQL workload that modifies data.
The question is rather if this makes sense. Normally you're better
off to disable binlogging while loading the dump, because this will
speed up this operation on the master (and thus reduce the downtime).
Of course you will then also have to load the same dump into the
slave(s) and resume replication with the binlog started after
initializing the master.
XL