How do I Interrupt a long query in the mysql command line tool without quitting mysql?

前端 未结 5 1022
囚心锁ツ
囚心锁ツ 2020-12-29 22:12

While debugging SQL statements, if I accidentally execute a query in using the mysql command line that outputs at lot of results (even if the query itself executes in reaso

5条回答
  •  悲哀的现实
    2020-12-29 22:38

    Bit late, but maybe my answer will help someone.

    A way to kill a concrete mysql query through the command line is:

    1. Identify the process id of that query by the command: mysqladmin processlist
    2. Assuming that the Id is the 5736748, to kill the query you have to type: mysqladmin kill 5736748

提交回复
热议问题