当开启事务后,程序挂了而事务没有提交,那么会被锁住,报错:连接超时,但不影响查询。
下面操作需要
权限
一、查询现在被占用的锁信息
select * from information_schema.innodb_trx
二、 kill掉线程
kill [ trx_mysql_thread_id ]
select * from information_schema.innodb_trx
二、 kill掉线程
kill [ trx_mysql_thread_id ]
转载于:https://www.cnblogs.com/dhcao/p/10451988.html