Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Script to kill all MySQL processes for database user
#Author : Arunlal A
echo -n "Enter databse user name: "
skill -9 -u $THEUSER ; for i in `mysqladmin processlist | grep $THEUSER | awk '{print $2}'` ; do mysqladmin kill $i ; done ; echo "$THEUSER has been killed!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment