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

How to check whether the data table is locked in mysql

王林
Release: 2020-09-01 15:05:17
Original
3300 people have browsed it

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

View the sql statement that caused the deadlock

show status like ‘%lock%’
Copy after login

(Related tutorial recommendations: mysql tutorial)

View the current lock table status

show OPEN TABLES where In_use > 0;
Copy after login

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!

Related labels:
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
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template