mkill [--host={mysql_host}] [--dbuser={mysql_user}]
[--password={mysqluser_pw}]
[--filter-user={regex}] [--filter-host={regex}] [--filter-db={regex}]
[--filter-command={regex}] [--filter-state={regex}] [--filter-info={{regex}}]
[--user={user}] [--slow={seconds}]
[--daemonize] [--test]
mkill --help
mkill --version
This program kills long running queries based on several criteria including query time, host, user, database, state, and query content.
The following keys are active while mkill is running:
q - quit
A log of killed queries is sent to STDERR, watched queries are sent to STDOUT. A typical command line would be:
mkill -sl 180 -fi 'select.*from bad_table' > /var/log/mkill.out 2> /var/log/mkill.kill