Sunday, May 26, 2013

Kill all MySQL transactions

This is an emergency measure.  I don't recommend you use it in production except when there's no other choice.

for i in `mysql -Ne "show processlist" | awk '{print $1}'`; do mysqladmin kill $i; done

No comments:

Post a Comment