轉載 https://blog.csdn.net/wanderlustLee/article/details/79235005
Lock wait timeout exceeded; try restarting transaction是鎖等待超時。是當前事務在等待其它事務釋放鎖資源造成的。
解決方法:
在mysql查詢中執行以下指令
select * from information_schema.innodb_trx
結果如圖:
找出與其他幾個有參數不同的線程,找出他的線程號mysql_thread_id
執行命令kill +線程號即可解決。