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.
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!