ITeye博客

mysql 死锁

bernoulli · 2016-09-03 16:54 · 数据库 · Markdown

Enter MySQL

mysql -u your_user -p

2) Let's see the list of locked tables

mysql> show open tables where in_use>0;

3) Let's see the list of the current processes, one of them is locking your table(s)

mysql> show processlist;

4) Kill one of these processes

mysql>kill put_process_id_here;


select concat('KILL ',id,';') from information_schema.processlist where user='root';
+------------------------+
| concat('KILL ',id,';') 
+------------------------+
| KILL 3101;             
| KILL 2946;             

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。