for i in $(mysql -e 'show processlist;' | awk '/database/ && /SELECT/' | awk '$6 > 10 {print $1}'); do echo "Killing query number: " $i; echo "KILL " "$i" ";"| mysql; done