kill_query
Cancel a running query in a MySQL session without disconnecting it. Preview with dry_run; includes audit logging and prevents killing its own session.
Instructions
[WRITE][risk=high] Cancel a session's running statement (KILL QUERY). No inverse.
The session stays connected; only its current statement is aborted. Captures the session's user/host/query for audit. Pass dry_run=True to preview.
Refuses this tool's own session id — the statement it would cancel is this very call. Enforced under dry_run too.
Args: session_id: Session/connection id (from list_sessions). dry_run: If True, preview without cancelling. target: Target name from config; omit for the default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | ||
| dry_run | No | ||
| session_id | Yes |