Mysql stop slave at log position
I want to re-dump a MySQL table from a master to its slave.
Can I
- stop the slave
- create a dump of the table I want with --single-transaction --master-flag to take note of开发者_JAVA百科 its log position
- start the slave, but have it stop once it reaches that log position
- apply the dump to replace the table
- start the slave again normally
How can I do step 3?
After you stop your slave, you can specify the positions you want to process up to in your START SLAVE
statement. Something like:
START SLAVE UNTIL MASTER_LOG_FILE='xxxxx', MASTER_LOG_POS=yyyyyy;
Documented here.
精彩评论