Home>Article>Database> How to check if there is a deadlock in mysql

How to check if there is a deadlock in mysql

王林
王林 Original
2020-10-28 16:04:54 4078browse

Mysql method to check whether there is a deadlock: execute the [show OPEN TABLES where In_use > 0;] command to check. If you want to release the deadlock process, execute the [kill id] command.

How to check if there is a deadlock in mysql

Specific method:

(Video tutorial recommendation:mysql video tutorial)

Query whether Lock table

show OPEN TABLES where In_use > 0;

Query process (if you have SUPER permissions, you can see all threads. Otherwise, you can only see your own thread)

show processlist

Kill the process id (which is the id column of the above command)

kill id

Related recommendations:mysql tutorial

The above is the detailed content of How to check if there is a deadlock in mysql. 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