{"id":15178897,"url":"https://github.com/mugli/go-kill-mysql-query","last_synced_at":"2025-10-26T17:31:26.299Z","repository":{"id":57494984,"uuid":"201617193","full_name":"mugli/go-kill-mysql-query","owner":"mugli","description":"Interactively shows long running queries in MySQL server and provides option to kill them one by one","archived":false,"fork":false,"pushed_at":"2019-09-07T15:21:03.000Z","size":631,"stargazers_count":77,"open_issues_count":2,"forks_count":11,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-01-31T21:52:55.248Z","etag":null,"topics":["cli-app","firefighting","go","golang","mysql","mysql-database","mysql-server"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mugli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-10T10:50:21.000Z","updated_at":"2024-08-17T12:17:30.000Z","dependencies_parsed_at":"2022-08-28T16:11:33.828Z","dependency_job_id":null,"html_url":"https://github.com/mugli/go-kill-mysql-query","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mugli%2Fgo-kill-mysql-query","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mugli%2Fgo-kill-mysql-query/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mugli%2Fgo-kill-mysql-query/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mugli%2Fgo-kill-mysql-query/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mugli","download_url":"https://codeload.github.com/mugli/go-kill-mysql-query/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238375228,"owners_count":19461569,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli-app","firefighting","go","golang","mysql","mysql-database","mysql-server"],"created_at":"2024-09-27T15:41:27.794Z","updated_at":"2025-10-26T17:31:25.932Z","avatar_url":"https://github.com/mugli.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kill-mysql-query\n\n```\n  _____     ____\n/      \\  |  o |\n|        |/ ___\\|\n|_________/\n|_|_| |_|_|\n```\n\n`kill-mysql-query` interactively shows long running queries in MySQL database and provides option to kill them one by one.\n\n👉 Great for firefighting situations 🔥🚨🚒\n\nIt can connect to MySQL server as configured, can use SSH Tunnel if necessary, and let you decide which query to kill. By default queries running for more than 10 seconds will be marked as long running queries, but it can be configured.\n\n![screenshot](https://raw.githubusercontent.com/mugli/go-kill-mysql-query/master/screenshot.png)\n\n---\n\n## Installation\n\nDownload binary from [release tab](https://github.com/mugli/go-kill-mysql-query/releases).\n\n---\n\n## Usage\n\n```\nkill-mysql-query [config.toml]:\n\tChecks for long running queries in the configured server.\n\tIf no file is given, it tries to read from config.toml\n\tin the current directory.\n\nOther commands:\n\n\tgenerate [config.toml]:\n\t\tGenerates a new empty configuration file\n\n\tinit:\n\t\tAlias for generate\n\n\thelp, --help, -h:\n\t\tShows this message\n\n```\n\n---\n\n## Configuration\n\nRun `kill-mysql-query init` to generate an empty configuration file.\n\n```\n[MySQL]\n  mysql_host = \"\"\n  mysql_port = 3306\n  mysql_username = \"\"\n  mysql_password = \"\"\n\n  # hosted_in_aws_rds: Optional.\n  #\n  # Uses `CALL mysql.rds_kill()` instead of `kill` command.\n  # Useful in RDS databases or replica where\n  # `mysql_username` may not have privilege to use `kill`\n  hosted_in_aws_rds = false\n\n  # db: Optional.\n  #\n  # If provided, filter out long running\n  # queries from other databases\n  db = \"\"\n\n[ssh_tunnel]\n  use_ssh_tunnel = false\n  ssh_host = \"\"\n  ssh_port = 22\n  ssh_username = \"\"\n  ssh_password = \"\"\n\n  # ssh_private_key takes priority over ssh_password\n  # if both are provided\n  ssh_private_key = \"\"\n\n  # ssh_key_passphrase: Optional.\n  ssh_key_passphrase = \"\"\n\n[long_running_query]\n  # Default is 10 seconds.\n  # `kill-mysql-query` will only list running queries\n  # those are being executed for more than or equal to\n  # this value.\n  timeout_second = 10\n\n```\n\n---\n\n## FAQ\n\n**How do I simulate a long running query to test `kill-mysql-query`?**\n\nThis stackoverflow answer may come in handy:\nhttps://stackoverflow.com/a/3892443/761555\n\n```\nselect benchmark(9999999999, md5('when will it end?'));\n```\n\n---\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmugli%2Fgo-kill-mysql-query","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmugli%2Fgo-kill-mysql-query","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmugli%2Fgo-kill-mysql-query/lists"}