While working on application with remote MySQL DB I needed to analyze queries from this application.
MySQL DB had no general_log enabled and I have no option to restart MySQL server.
That is why I used tcpdump and pt-query-digest.
Dump MySQL traffic on application server
tcpdump -ni vlan21 port 3306 -s 65535 -x -n -q -tttt > /tcpdump.out
Then analyze it
pt-query-digest --type tcpdump --output slowlog /tcpdump.out
This analyzer built by Percona.
https://repo.percona.com/I took it from
https://repo.percona.com/percona/yum/release/centos/latest/os/x86_64/packet: percona-toolkit-*
description:
https://www.percona.com/doc/percona-toolkit/LATEST/pt-query-digest.html
You should to log in