#!/bin/bash for f in `mysqladmin process | grep $1 | awk -F '|' '{print $2}'` do mysqladmin kill $f; done