Home  >  Article  >  Database  >  How to solve the problem of mysql update failure

How to solve the problem of mysql update failure

藏色散人
藏色散人Original
2020-11-03 09:35:086408browse

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.

How to solve the problem of mysql update failure

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn