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.
Specific method:
(Video tutorial recommendation: mysql video tutorial)
Query whether Lock table
show OPEN TABLES where In_use > 0;
Query process (if you have SUPER permissions, you can see all threads. Otherwise, you can only see your own thread)
show processlist
Kill the process id (which is the id column of the above command)
kill id
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!