Java执行一个SQL查询未提交,遇到1205错误。
java.lang.Exception:
### Error updating database. Cause: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction
解决办法:
执行MySQL命令: show full processlist;
然后找出查询语句的系统id:kill掉被锁住的线程id
查看事物表: select * from information_schema.innodb_trx;
摘自:http://blog.csdn.net/wp1603710463/article/details/51721894