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

How to solve the problem of mysql update failure

藏色散人
Release: 2021-04-14 11:35:12
Original
6468 people have browsed it

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';
Copy after login

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template