JZTXT
  • 首页
  • Ai
  • Java
  • Python
  • Android
  • Mysql
  • JavaScript
  • Html
  • CSS

【Mysql】update时报错:Lock wait timeout exceeded; try restarting transaction

发布时间 2023-05-16 16:40:33作者: iyobucuo

1、查找正在执行的事务

SELECT * FROM information_schema.INNODB_TRX;

2、杀掉 LOCK WAIT 的进程

trx_mysql_thread_id:进程id

kill xxx

OR

3、查看所有进程

SHOW PROCESSLIST;

4、杀掉异常的进程,比如 Sleep 状态、影响你正在操作的业务的进程

id:进程id

kill xxx
    本栏目推荐文章
  • [翻译]-Query and Transaction size in MySQL
  • nginx反向代理时报no resolver defined to resolve
  • 连接MySQL时报错:Public Key Retrieval is not allowed的解决方法
  • 装载数据时报错:Failed to execute spark task, with exception 'org.apache.hadoop.hive.ql.metadata.HiveException(Failed to create spark client.)'
  • [转帖]ORA-01450 maximum key length (3215) exceeded
  • npm升级时报错
  • 关于SpringBoot的测试类中进行CRUD时报空指针异常
  • 安装seurat-wrappers包时报错,需要Seurat >= 5.0.0
  • npm install安装依赖包时报错npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node install.js,npm ERR! ChromeDriver installation failed Error with http(s) request: Error: read ECONNRESET
  • kepware运行时报错: no suitable 32-bit JRE was configured or found.
版权声明:本网站为非赢利性站点,本网站所有内容均来源于互联网相关站点自动搜索采集信息,相关链接已经注明来源。
联系我们