Skip to content

Instantly share code, notes, and snippets.

@rushipkar90
Created September 25, 2015 16:54
Show Gist options
  • Save rushipkar90/e68446ab270f6eff20ea to your computer and use it in GitHub Desktop.
Save rushipkar90/e68446ab270f6eff20ea to your computer and use it in GitHub Desktop.
mysqlkilluser.sh
#!/bin/bash
if [[ $1 != "" ]]
then
for p in `mysqladmin proc stat | grep $1 | awk '{print $2}'`
do
mysqladmin kill $p
done
else
echo "Usage: mysqlkilluser.sh <user>"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment