How do I kill all the processes in Mysql “show processlist”?

后端 未结 23 1907
温柔的废话
温柔的废话 2020-12-04 04:49

Because I see a lot of processes there, and the \"time\" column shows big values for all of them.

23条回答
  •  既然无缘
    2020-12-04 05:25

    This snipped worked for me (MySQL server 5.5) to kill all MySQL processes :

    mysql -e "show full processlist;" -ss | awk '{print "KILL "$1";"}'| mysql
    

提交回复
热议问题