Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save TomCan/b6b332ada994fcb2f500bdbd1ae6438a to your computer and use it in GitHub Desktop.
Save TomCan/b6b332ada994fcb2f500bdbd1ae6438a to your computer and use it in GitHub Desktop.
# this requires that MySQL is accessed through TCP/IP, not the unix socket.
# run tcpdump for 30 seconds capturing traffic on port 3306
timeout 30 tcpdump -s 65535 -x -nn -q -tttt -i any port 3306 > mysql.tcp.txt
# run pt-query-digest on collected file
pt-query-digest --type tcpdump mysql.tcp.txt >pt.out
@TomCan
Copy link
Author

TomCan commented Jan 22, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment