The solution to mysql update failure: first open the command window; then execute the "select * from information_schema.innodb_trx kill 15758" statement to solve the problem.
The operating environment of this article: windows7 system, mysql8 version, Dell G3 computer.
Mysql update error
When I was working today, I found that a certain field of update in a table timed out. After thinking about it for a long time, the first thing I thought of was to extend the operation time. :
mysql> set innodb_lock_wait_timeout=100 mysql> show variables like 'innodb_lock_wait_timeout';
However, although the time has been extended, the problem has not been solved. After searching on the Internet, I found that the mysql transaction may not be submitted, resulting in a lock table. The solution is as follows:
select * from information_schema.innodb_trx kill 15758
Among them 15758 is the id of thread
Recommended: "mysql video tutorial"
The above is the detailed content of How to solve the problem of mysql update failure. For more information, please follow other related articles on the PHP Chinese website!