dbTalk Databases Forums  

Re: Process to reload master database of master/slave pair

comp.databases.mysql comp.databases.mysql


Discuss Re: Process to reload master database of master/slave pair in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Axel Schwenke
 
Posts: n/a

Default Re: Process to reload master database of master/slave pair - 04-02-2012 , 05:44 PM






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

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.