Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Script to kill all MySQL processes for database user
#!/bin/bash
#Author : Arunlal A
#Website: https://www.crybit.com
echo -n "Enter databse user name: "
read THEUSER
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
You can’t perform that action at this time.