Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

info: my tables are all innodb.

i know i can create a mysql slave by copying the data from master to slave and noting the position in the binlog and set that on the slave. thus the slave should be able to replay all master binlog entries since the backup and sync that way.

but, in case the binlog exists from the start, can i simply set the binlog position on the slave to 0, thus not having to copy any data and just have the slave catch up to the most recent binlog entry?

share|improve this question

That could work if

  • You loaded data in an empty MySQL instance
  • You had binary logging enabled from the start
  • You never erased any of your binary logs

There is one catch: There is no literal position 0.

There is a different position 0 for different versions of MySQL

  • position 107 (MySQL 5.5)
  • position 106 (MySQL 5.1)
  • position 98 (MySQL 5.0 and prior)

I wrote about this a long time ago in the DBA StackExchange:

If you do not have every binary log since the inception of the MySQL Data Load, you could make a copy using rsync and one restart of mysql:

share|improve this answer

If you really have all the binlogs, and the database set up correctly, I can't think of any technical reason why not. The entire reason behind the binlog is to allow this sort of thing.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.