HOW TO FORCE UNLOCK for locked tables in MySQL:
Breaking locks like this may cause atomicity in the database to not be enforced on the sql statements that caused the lock.
This is hackish, and the proper solution is to fix your application that caused the locks. However, when dollars are on the line, a swift kick will get things moving again.
- Enter MySQL
mysql -u your_user -p
- Let's see the list of locked tables
mysql> show open tables where in_use>0;
- Let's see the list of the current processes, one of them is locking your table(s)
mysql> show processlist;
- Kill one of these processes
mysql> kill <put_process_id_here>;