系统执行update语句是发现报了这个错误:
com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Lock wait timeout exceeded; try restarting transaction
这条语句被锁住了
进入mysql使用
SELECT * FROM information_schema.innodb_trx
发现有两个事务处于运行中(trx_state=”RUNNING”),找到对应线程,执行:
kill 线程ID(trx_mysql_thread_id)
恢复正常