早上起来发现自己的错误日志提醒疯狂提示,错误如下:
2.解决过程; Lock wait timeout exceeded; try restarting transaction; nested exception is com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Lock wait timeout exceeded; try restarting transaction
我们使用Navicat或者直接用命令连接到我们的数据库
- 查看是否锁表
show PROCESSLISTbiji
-
kill掉锁表的进程
-
查看锁表进程
show OPEN TABLES WHERe in_use>0;



