At the master server 

Obtain the Replication Master Binary Log Info.

mysql> SHOW MASTER STATUS; 

The output will looking similar to the following, and will have two pieces of critical information:


+------------------+----------+--------------+------------------+
| File             | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000001 |      107 | example      |                  |
+------------------+----------+--------------+------------------+
1 row in set (0.00 sec)


The File column shows the name of the log file and the Position column shows the position within the file. In this example, the binary log file is mysql-bin.000001 and the position is 107. Record these values. You need them later when you are resetting the slave. They represent the replication coordinates at which the slave should begin processing new updates from the master.


At the Slave server

mysql> stop slave;
mysql> reset slave;
mysql> CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=107 FOR CHANNEL 'Server-1';
mysql> start slave;



  • No labels