Skip to content

Instantly share code, notes, and snippets.

@c9n
Forked from rebx/gist:1250106
Created August 14, 2017 08:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save c9n/af566ca36659da4002bc159ce0978753 to your computer and use it in GitHub Desktop.
Save c9n/af566ca36659da4002bc159ce0978753 to your computer and use it in GitHub Desktop.
tshark'ing mysql
live:
tshark -i eth0 -aduration:60 -d tcp.port==3306,mysql -T fields -e mysql.query 'port 3306'
capture:
tcpdump -i eth0 port 3306 -s 1500 -w tcpdump.out
tshark -r tcpdump.out -d tcp.port==3306,mysql -T fields -e mysql.query > query_log.out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment