Nov 8, 2018

Example of killing long MySQL queries

for ID in $(mysql -uroot -e "select id from information_schema.processlist where time >=1200 and info like '%procseries%' ;")
do echo -n "killing ${ID}"
mysql -uroot  -e "kill $ID;"
done