Fantastic New Tool!!!!!
I just looked at the finished product of a co-worker. It solves a troubling problem that any DBA will come up against from time to time. The tool is called Querysniffer and it grabs MySQL queries from “the wire”. It does this in real time. You don’t have to stop/start your MySQL server or have to enable the general query log. You can start and stop the Querysniffer at any time.
Massively cool in my opinion!!
Querysniffer is available from http://iank.org/querysniffer. It is written out of perl and is available as both a perl script and a pre-made executable.
As an example I run the program on the server that MySQL is running:
kmurphy@db5-a:~$ sudo mysqlsniff.x64 > output
This must be run from sudo or as root. In this case we send the results to the file output. You can also specify an Ethernet port to grab queries. This is done by adding an eth0 or eth1 before specifying the output file:
kmurphy@db5-a:~$ sudo mysqlsniff.x64 eth0 > output
Why would you want to do this? If you are running Querysniffer on a server that is attached to a SAN then you should probably specify the interface that is not attached to the SAN.
Thanks for the hard work Ian. You have made the lives of a lot MySQL DBAs a little easier!!!
1 Comment so far
Leave a reply
I can’t add your post to Digg. How I do this?