問題:當在mysql執(zhí)行一個DDL語句時候,報1205.
本來想刪除一段時間的數(shù)據(jù),語句如下:
delete from pdsw.mt_monitor_result_all where create_date<'2022-10-22 00:00:00';
報錯如下:1205 - Lock wait timeout exceeded; try restarting transaction,主要是源數(shù)據(jù)都是屁了insert的,可能沒有提交,資源被占,現(xiàn)在殺掉這個 鎖住的進程id就OK。
主要的解決辦法:
1.執(zhí)行?SHOW FULL PROCESSLIST,找到這個語句,最前面有這個語句的id,直接 kill ID,就可以解決。
KILL ID
2. 執(zhí)行 select * from information_schema.innodb_trx,查出語句 id,和前面一樣,直接kill掉就ok。
select * from information_schema.innodb_trx;
文章來源:http://www.zghlxwxcb.cn/news/detail-646551.html
文章來源地址http://www.zghlxwxcb.cn/news/detail-646551.html
到了這里,關于MySql報1205:1205 - Lock wait timeout exceeded; try restarting transaction,出現(xiàn)1205如何解決的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網!