Home >Database >Mysql Tutorial >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:544172browse

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