Lock wait timeout exceeded; try restarting transaction

-- 查看進程,刪除trx_state=LOCK的進程
select * from information_schema.innodb_trx;
 
kill trx_id;
 
 
-- 刪除耗時較長的線程
SELECT * from information_schema.`PROCESSLIST` WHERE Time > 1000 AND USER = 'root' ORDER BY TIME desc;
 
kill id;

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章