Skip to content

Instantly share code, notes, and snippets.

@legatoo
Created March 19, 2016 01:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save legatoo/baf1c04e1a5a59792a73 to your computer and use it in GitHub Desktop.
Save legatoo/baf1c04e1a5a59792a73 to your computer and use it in GitHub Desktop.
Kill lock mysql transcation.
#查看 mysql 正在进行的进程
show processlist;
mysqladmin processlist -h 10.4.243.25 -P 6002 -uq3boy -p123
# transcation 部分可以看到那个 thread 给 lock 了,然后杀掉解锁
SHOW ENGINE INNODB STATUS \G;
#杀掉 mysql 任务
kill id
mysqladmin kill 34522319 -h 10.4.243.25 -P 6002 -uq3boy -p123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment