MySQL更新卡住报错lock wait timeout

来源:这里教程网 时间:2026-03-01 16:45:05 作者:

MySQL更新卡住报错lock wait timeout先查数据库有没锁: select * from information_schema.innodb_trx select * from information_schema.innodb_locks select * from information_schema.innodb_lock_waits有所就把锁的进程杀了。 如果没有锁,查看有没未提交事务。 -- 从 information_schema.innodb_trx 表中查看当前未提交的事务 select trx_state, trx_started, trx_mysql_thread_id, trx_query from information_schema.innodb_trx; -- trx_mysql_thread_id:MySQL的线程ID,用于kill kill 2199075; kill 25650928; 杀掉未提交事务,问题解决。

相关推荐