Jan 16, 2013

How to Find MySQL Locks?

If your MySQL (Master or Slave) seems to be locked, you can always use one of the following methods to detect the locks and take care of them:
  1. If it's an InnoDB based database use SHOW ENGINE INNODB STATUS\G
  2. Check SHOW FULL PROCESSLIST; to verify if any queries are running now (or just stuck).
  3. If you use MyISAM or just need some more information, enable the MySQL debug mode by using > mysqladmin -uuser -ppassword debug and then check for the output at the error log.
  4. Consider using tools such as mysqlreport (it has a nice explanation here) or mysqltuner to verify your server configuration.
Bottom Line
Locked database is not a nice thing, but it can be detected and eliminated...

Keep Performing,


Intense Debate Comments

Ratings and Recommendations