starting a second slave from a first slave's dump Scenario:
host a is the master
host b is a replication slave
host c is to become a second replication slave
there's no full dump from host a
Normally, to start a new slave, I'd restore a dump from host a, and
start slaving using the master data in that dump. In this situation,
however, running a full mysqldump on a would cause it to be unresponsive
for a while, and the app is depending on it (mostly MyISAM so can't run
the dump as a transaction).
I can temporarily make the front-end application not read from host b,
and while host b is not in use, run a full mysqldump there of the same
db, and restore that dump onto host c.
.... but how do I find the master data to start host c slaving with?
The dump file will have master data referring to host b's binlogs,
which are mostly empty because it's a replication slave. I need to
know what position in host a's binlogs to start host c slaving from.
One possibility I can think of:
- stop slave on host b
- run the dump on host b
- note its position in host a's binlogs using "show slave status"
- restore the dump on host c
- start c slaving using the binlog name and position from "show slave status"
Will that work?
Is there a way to do this *without* stopping replication on host b?
-- Cos |