mysql批量删除时间长的进程

首先show processlist 条数太多不知道列名,根据其中id查询,可以看到列名time 然后查时间长的 你可以复制,或者把结果直接导成文件 select concat('KILL ',id,';') from information_schema.processlist where time>1000 into outfile '/tmp/a.txt'; 然后再mysql中运行这个文件就
相关文章
相关标签/搜索