Specific method: (Recommended tutorial: MySQL database learning tutorial) Check the table lock status # Check which tables are locked show OPEN TABLES where In_use > 0; View the SQL statement that caused the deadlock # Query the runtime information of the innodb engine show engine innodb status; Query process #Query all processes show processlist; Unlock (delete process) # Delete process kill id; View what is being locked # View the things being locked SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCKS View things waiting for locks # View transactions waiting for locks SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCKS; Supplementary content MySQL lock status view command
This is the end of this article about how to query whether a MySQL table is locked. For more information about how to query whether a MySQL table is locked, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: How to install Solr 8.6.2 in Docker and configure the Chinese word segmenter
>>: Mysql join query syntax and examples
In the previous article, we have realized the sim...
This article example shares the specific code of ...
Aggregating data from various sources allows the ...
Table of contents 1. Create a redis docker base i...
Preface How to write efficient SQL statements is ...
Preface The computer I use is a Mac, and the oper...
1. Download the installation package -Choose the ...
The default storage directory of mysql is /var/li...
If you are a developer looking to get into the wo...
There is no mysql by default in the yum source of...
Navicat reports errors 10060 and 1045 when connec...
Table of contents 1. Declare and initialize array...
1. Download mysql-5.7.21-windowx64.zip from the o...
Component Basics 1 Component Reuse Components are...
Table of contents Data Brokers and Events Review ...