Skip to content

Instantly share code, notes, and snippets.

@collisiondetection
Forked from gstark/tcpdump.txt
Created June 26, 2019 12:05
Show Gist options
  • Save collisiondetection/7ce4c97add9c80a0d72c9223443fd3db to your computer and use it in GitHub Desktop.
Save collisiondetection/7ce4c97add9c80a0d72c9223443fd3db to your computer and use it in GitHub Desktop.
Use tcpdump to monitor mysql
Use tcpdump to monitor mysql
# Capture the packets
sudo tcpdump -i eth0 port 3306 -s 65535 -x -n -q -tttt > tcpdump.out
# analyze all the requests from a given host
pt-query-digest --type=tcpdump --filter '($event->{host} || $event->{ip} || "") =~ m/192.168.248.64/' tcpdump.out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment