#!/bin/bash #by LC USER=root PASS=123456 PID=`mysql -u$USER -p$PASS -e "show processlist;"|grep -i 'sleep'|awk '{print $1}'` for n in $PID do mysql -u$USER -p$PASS -e "kill $n" done
转载于:https://blog.51cto.com/10896311/1720833
#!/bin/bash #by LC USER=root PASS=123456 PID=`mysql -u$USER -p$PASS -e "show processlist;"|grep -i 'sleep'|awk '{print $1}'` for n in $PID do mysql -u$USER -p$PASS -e "kill $n" done
转载于:https://blog.51cto.com/10896311/1720833