解决mysql锁表,navicate操作卡死

 

1. 查询锁死的数据库和对应的表

show OPEN TABLES where In_use > 0;

2. 查询 mysql 当前进程

show full processlist

3. 杀死进程

根据 state 的为 waiting 判断当前进程造成表锁死,然后根据db是自己的数据库进行杀死进程操作 记下 id ( state 为 waiting, db 是自己的数据库)

kill Id

再次查询,发现锁死的表已经消失了

show OPEN TABLES where In_use > 0

参考文章

本文遵守 Attribution-NonCommercial 4.0 International 许可协议。 Attribution-NonCommercial 4.0 International