Skip to content

Instantly share code, notes, and snippets.

@v0112358
Created January 13, 2014 06:55
Show Gist options
  • Save v0112358/8395766 to your computer and use it in GitHub Desktop.
Save v0112358/8395766 to your computer and use it in GitHub Desktop.
Dump mysql query
sudo date
# password
export DT=`date +%y%m%d.%H%M%S`
sudo /usr/sbin/tcpdump -i any port 3306 -s 65535 -x -nn -q -tttt -c 10000 > ${DT}.tcp
./mk-query-digest --type tcpdump --limit 100%:50 ${DT}.tcp > ${DT}.out
more ${DT}.out
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment