Python切换到新master的脚本
看到有个不错的切换master的脚本,python编写的;可以自动切换到新master上的脚本,拿下来分享下;def replicate_to_position(server,pos):server.sql("START SLAVE UNTIL MASTER_LOT_FILE=%s,MASTER_LOG_POS=%s",(pos.file,pos.pos))server.sql("SELECT MASTER_POS_WAIT(%s,%s)",(pos.fi...