Problem Description:
Execute insert or update, delete, error code: 1205. Lock wait timeout exceeded; try restarting transaction
Solution:
#1. View transaction table
select * from information_schema.innodb_trx
TRX was found in the results_ mysql_ thread_ ID has value xxxx (number)
#2. Operation– There will be a piece of data corresponding to xxxx (number) in the result
show processlist
#3. Execute in SQL
kill xxxx
Cause analysis:
The InnoDB storage engine of MySQL supports transactions. After the transaction is started, it is not actively committed. This causes the resource to be occupied for a long time. When other transactions preempt the resource, the preemption fails due to the lock of the previous transaction! Therefore, lock wait timeout exceeded appears
Similar Posts:
- MySQL reports an error lock wait timeout exceeded; Try restarting transaction problem solving method
- Lock wait timeout exceeded; try restarting transaction-Mysql [How to Solve]
- MySQL error 1205: lock wait timeout exceeded solution
- How to Solve Mysql Error 1206: The total number of locks exceeds the lock table size
- MySQL Error: Waiting for table metadata lock [How to Solve]
- [ERROR] InnoDB: Unable to lock ./ibdata1,error: 11
- ERROR 2006 (HY000): MySQL server has gone away No
- [Solved] MySQL Fail to Start Error: Error number 28 means ‘No space left on device’
- ‘InnoDB’ init function returned error.[mysql5.6]