As a last resort you can always shut-down and restart your mysqld server process. You need to run following command to kill the process. How to kill locking query from show processlist.
Database Administrators Stack. MySQL because locks can only be .
Mysql SHOW OPEN TABLES shows In_use but nothing in. MySql timeouts waiting for table lock , no apparent deadlocks. LOCK TABLES and UNLOCK TABLES Statements. You can safely use KILL to terminate a session that is waiting for a table lock.
In case such a session exists, you need to kill the query. The database engine will detect the deadlock and kill one of the transactions, unblocking the other one and . If you want to stop the transaction, you can stop ( kill ) any running . SLEEP thread causing Waiting for table metadata lock.
As we can also see, each of those transactions holds two lock. The quick solution is simple: kill those connections and InnoDB will roll back . Sometimes you need to kill multiple SQL queries at once.








