Tailing MySQL Binary Log
export D=$(date +"%Y-%m-%d %H:%M:%S" --date="30 minutes ago"); watch "mysqlbinlog --start-datetime=\"$D\" mysql-bin.000040|tail"
Written by Tom O'Connor
Related protips
2 Responses
Can you explain what this does?
over 1 year ago
·
It runs mysqlbinlog with 30 minutes ago (that's what the D variable and --start-datetime does). Then it watches mysqlbinlog rerunning every two seconds and tailing the output.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#