|
Use the following procedure:
-
On the master, execute these statements:
mysql> FLUSH TABLES WITH READ LOCK;
mysql> SHOW MASTER STATUS;
Record the replication coordinates (the current binary log file name and position) from the output of the SHOW statement.
-
On the slave, issue the following statement, where the arguments to the MASTER_POS_WAIT() function are the replication coordinate values obtained in the previous step:
mysql> SELECT MASTER_POS_WAIT('log_name ', log_pos );
The SELECT statement blocks until the slave reaches the specified log file and position. At that point, the slave is in synchrony with the master and the statement returns.
-
On the master, issue the following statement to enable the master to begin processing updates again:
mysql> UNLOCK TABLES;
|