1

I am having a problem in mysql replication.

I have a mysql raw data snapshot and my master host have 2 binary logs (binlog.01, binlog.02 - start to log after snapshot was created)

What I want to do is copy raw data snapshot to slave host, execute binlog.01 using mysqlbinlog utility and then at change master to master host point to binlog.02 at the start postion 1.

When slave process the both of binary logs completely, I use mk-table-checksum to check the replication and I get a dozen of inconsistent message.

However, with another method, I try to copy raw data snapshot to slave host again, change master to master host point to binlog.01 at start position 1 - without process any mysqlbinlog command - I realized that I does not get any inconsistent message when using mk-table-checksum anymore.

I want to know that why database is inconsistent when using mysqlbinlog. Please, any help would be appreciated.

4
  • How did you take the raw data snapshot? Commented Oct 10, 2011 at 10:58
  • Are the Master and Slave the same version of MySQL? Commented Oct 10, 2011 at 13:27
  • @quanta I got raw data by stop mysql service and copy it to slave host Commented Oct 11, 2011 at 8:24
  • @jasondbecker yes, they are the same Commented Oct 11, 2011 at 8:26

1 Answer 1

0

It looks like you'are doing in wrong way. How can you know that binlog.01, binlog.02 are created right after you take snapshot?

The right way is:

  • stop master or flush tables with read lock;
  • determine the current binlog file and position with show master status;
  • take data snapshot
  • copy snapshot to the slave
  • configure the slave with replication coordinates from the master change master to
  • start the slave threads

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.