phpMyAdmin Database Table Locked and in Use

Issue: WordPress driven website on CentOS using MariaDB, MyISAM tables. Site has display problems (navigation disorganized, image thumbnails not displaying, etc.) phpMyAdmin shows a table (wp_postmeta) is noted as being “In Use”. As such the table is locked and unable to be used.

If working is SSH you’ll see instead a message such as:

error : Can’t create new tempfile: ‘./accountname_wp/wp_postmeta.TMD’
status : Operation failed

Solutions: SSH into server and issue the following commands:

cd /var/lib/mysql/<database-name>
myisamchk --safe-recover --force <table-name>

Depending on the size, it can take a little longer than expected to repair.

Leave a comment

BlogLogistics