2

I have two machines with MySQL servers instances A and B. I want to add another MySQL server C which should replicate from B rather than from A. I may stop B but not A. These are the steps I tried:

  1. Create a new VM for server C
  2. rsync /var/lib/mysql from B to C
  3. Stop B
  4. rsync /var/lib/mysql from B to C again.
  5. Start B (ok)
  6. Start C with skip-slave-start
  7. Take a look at SHOW SLAVE STATUS on server C.
  8. CHANGE MASTER on server C
  9. START SLAVE on server C
  10. Failed.

    Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'
    

Which values should I set on CHANGE MASTER?

1 Answer 1

1

I found out the answer on my own. After the first rsync (before stopping the MySQL daemon), you need to stop the slave process on server B and ask its master status with SHOW MASTER STATUS. These values must be set with CHANGE MASTER on server C before starting the slave process there.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .