Skip to content

Instantly share code, notes, and snippets.

@t0mmyt
Created January 20, 2014 10:43
Show Gist options
  • Save t0mmyt/8518114 to your computer and use it in GitHub Desktop.
Save t0mmyt/8518114 to your computer and use it in GitHub Desktop.
Difference in slave mysql log position
echo 'SHOW SLAVE STATUS\G' | mysql -u root -p$pw mysql | grep 'Master_Log_Pos' \
| awk '/Read/{a=$NF} /Exec/{b=$NF} END{print a-b}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment