Q: What SQL is running on your MySQL database server now?
A: The bane of pain for MySQL DBA’s when there is no official MySQL instrumentation that is dynamic and fine grained sufficiently to solve this problem at the SQL interface.
While hybrid solutions exist, the lack of dynamic and real-time are the issues. There is however great work being done by Baron and others on Maatkit mk-query-digest and packet sniffing the MySQL TCP packets.
$ sudo tcpdump -i eth0 port 3306 -s 65535 -x -n -q -tttt | ./mk-query-digest --type tcpdump tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes # Caught SIGINT. 5444 packets captured 8254 packets received by filter 2809 packets dropped by kernel #[Read more...]