MySQL error 1205: lock wait timeout exceeded solution

Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>

Error 1205 (HY000): lock wait timeout exceeded; try restarting transaction

Error reason: an SQL execution is finished, but it is not committed. If the following SQL wants to execute, it is locked, and the timeout ends

Solution:

1. View the process information of the database

show full processlist;

2. View the transaction table

SELECT * FROM information_schema.INNODB_TRX

Note: abnormal transaction found (usually records whose start time is a long time from now)

/*Note the TRX in the result_ mysql_ thread_ The value of the ID part*/

Find the corresponding ID, and then kill the value of ID

Similar Posts: