mysql批量刪除時間長的進程

首先show processlist 條數太多不知道列名,根據其中id查詢,可以看到列名time 然後查時間長的 你可以複製,或者把結果直接導成文件 select concat('KILL ',id,';') from information_schema.processlist where time>1000 into outfile '/tmp/a.txt'; 然後再mysql中運行這個文件就
相關文章
相關標籤/搜索