bugcy013
7/12/2014 - 7:06 PM

tcpdump.txt

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