Mysql Slave doesn’t find binary log from slave

MySQLreplication

I have to setup a MySQL slave on an other infrasctructure. It will become the Master once that other infrasctructure is ready.

Mysql 5.6.29
Slave A in old infrasctructure
Slave B in new one

I dumped the Slave A database by performing a STOP SLAVE;, FLUSH TABLES WITH READ LOCK then the mysqldump and restarted the slave with START SLAVE.
I've now a perfect dump of my slave A with the master binlog and its position.

I dumped the dump into the Slave B and setup the correct binlog and position for the replication.
Once started, the Slave B couldn't find the binlog. But they are all in the right /var/lib/mysql folder on the Slave A. When I say they are all there I mean I put them myself in the folder in fact, otherwise they are deleted (I don't know why).

I really don't understand what I'm missing here.

log-slave-updates is ON on the Slave A

Best Answer

Master -> A -> B

binlog on A needs to be turned on.

B must use the binlogs from A, not from the Master.

So...

  1. Turn on binlogging on A.
  2. Stop replication from Master -> A.
  3. Dump A
  4. Load dump onto B
  5. CHANGE MASTER to point B to A.
  6. Start replication from Master -> A. Things should flow all the way to B.