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?
Best Answer
That could work if
There is one catch: There is no literal position 0.
There is a different position 0 for different versions of MySQL
I wrote about this a long time ago in the DBA StackExchange:
Feb 04, 2011
: MySQL master binlog corruptionJun 09, 2011
: Yum update mysql from 5.1 to 5.5If 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 ofmysql
:Apr 08, 2011
: Create a MySQL slave from another slave, but point it at the masterJul 08, 2011
: MySQL slave replication reset with no Master Downtime (using MyISAM)Nov 06, 2012
: How to efficiently dump a huge MySQL innodb database?