Skip to content

fimmtiu/mysql-query-logger

Repository files navigation

mysql-query-logger

Ever want to log all the SQL statements being executed against a MySQL database, but don't want to crush your DB server like an empty beer can under the I/O load of all that logging? mysql-query-logger is a program which logs SQL queries on a MySQL server by monitoring the local network and picking out the packets that look like queries.

Usage

mysql-query-logger [-h host] [-p port] [-i interface] [-l log-level] [logfile]

host and port are the host and port that your MySQL server is accepting connections on. interface is the local network interface. If no logfile is supplied, this program logs to standard output. log-level is an integer from 0 to 3 which specifies how much debugging output to print; the default is 0. (You are unlikely to ever need this.)

For obvious reasons, this program needs to be run on a machine in the same subnet as the MySQL server; if it's a switched network, you'll have to configure your switch to tee the MySQL server's traffic to the server running mysql-query-logger.

License

Distributed under the MIT License. See the LICENSE file included in this repository for details.

About

Logs all requests to a MySQL server with pcap

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages