Home  >  Article  >  Database  >  How to check whether the data table is locked in mysql

How to check whether the data table is locked in mysql

王林
王林Original
2020-09-01 15:05:173163browse

Mysql method to check whether the data table is locked: first open the command prompt and log in to mysql; then execute the [show engine innodb status\G;] command in the command prompt.

How to check whether the data table is locked in mysql

Specific method:

(Recommended video tutorial: mysql video tutorial)

Open first Command prompt, log in to mysql;

Then execute the following command on the mysql command line:

show engine innodb status\G;

View the sql statement that caused the deadlock

show status like ‘%lock%’

(Related tutorial recommendations: mysql tutorial)

View the current lock table status

show OPEN TABLES where In_use > 0;

The above is the detailed content of How to check whether the data table is locked 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