Skip to content

Instantly share code, notes, and snippets.

@deathcult
Created November 27, 2013 18:31
Show Gist options
  • Select an option

  • Save deathcult/7680783 to your computer and use it in GitHub Desktop.

Select an option

Save deathcult/7680783 to your computer and use it in GitHub Desktop.
kill掉mysql Locked进程。
#!/bin/sh
## MySQL 5.1.61
## mysql_kill_locked.sh #调试
## mysql_kill_locked.sh | sh #执行
## ID != 1
mysqladmin -u* -p* processlist |grep Locked |awk '{if($2!=1)print "mysqladmin -u* -p* kill " $2}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment