查看两个yes和一个id号

Slave_IO_Running:YES  

Slave_SQL_Running:YES

 

#截取远程Position号

#mysql -h 192.168.18.31 -u 'ceshi' -p123 -e 'show master status \G' |awk 'NR==3{print $2}'
#截取master的binlog的同步文件
#mysql -h 192.168.18.31 -u 'ceshi' -p123 -e 'show master status \G' |awk 'NR==2{print $2}'
#截取本地的slave的Position号
#mysql -e 'show slave status \G' |awk 'NR==23{print $2}'