php - Waiting until slave has been synchronized -
is there sql (or php command) can used either force master propagate changes slaves and/or wait until changes have been propagated slaves?
you can use function master_pos_wait()
. call function in sql expression on slave, , block (not return) until slave has executed specified log file & position.
select master_pos_wait('mysql-bin.000042', 8675309);
see https://dev.mysql.com/doc/refman/5.6/en/master-pos-wait.html
Comments
Post a Comment