How to stop a running mysql query

前端 未结 3 1184
陌清茗
陌清茗 2020-12-10 01:29

How do I stop a running mysql query programmatically?

The problem I\'m facing is that a query is constructed using user supplied data, and may occasionally take a v

3条回答
  •  盖世英雄少女心
    2020-12-10 01:36

    You can issue MySQL specific commands through the standard libraries provided by MySQL and run KILL QUERY. Possibly it's best listing the processes and figuring out which thread you need to kill first.

    Depending on your application this might create a security issue though (since you need to give more privileges to the connecting application user).

提交回复
热议问题