如何停止正在运行的MySQL查询? [英] How can I stop a running MySQL query?

查看:232
本文介绍了如何停止正在运行的MySQL查询?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从Linux shell连接到mysql.我时不时地运行一个太大的SELECT查询.它可以打印,我已经知道这不是我的意思.我想停止查询.

I connect to mysql from my Linux shell. Every now and then I run a SELECT query that is too big. It prints and prints and I already know this is not what I meant. I would like to stop the query.

(两次)击中Ctrl+C会完全杀死mysql并将我带回外壳,因此我必须重新连接.

Hitting Ctrl+C (a couple of times) kills mysql completely and takes me back to shell, so I have to reconnect.

是否可以在不杀死mysql本身的情况下停止查询?

Is it possible to stop a query without killing mysql itself?

推荐答案

mysql>show processlist;

mysql> kill "number from first col";

这篇关于如何停止正在运行的MySQL查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆