5 mysql -Be 'show slave status\G'|perl -ne 'm/(Seconds|Slave)_.+?\: (.+)\n/ && print " ".$2;';
7 if ! mysql -Be 'show slave status\G'|awk '/Slave_SQL_Running/{print $2}'|grep -q Yes; then
8 echo "Advancing mysql by 1";
9 mysql -Be "SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; start slave;";