Home > Database > Mysql Tutorial > body text

How to check if there is a deadlock in mysql

王林
Release: 2020-10-30 16:56:15
Original
4148 people have browsed it

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

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

show processlist
Copy after login

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

kill id
Copy after login

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!

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