How to resolve "phpMyAdmin shows table in use" issue?

Publish: 2014-09-03 | Modify: 2014-09-03

Today, when using phpMyAdmin to bulk close comments for some websites, a prompt in English popped up, roughly meaning that I need to repair the table. I followed the instructions and then tragedy struck. When I checked the database structure, it showed "in use" and the website couldn't be accessed anymore. See the screenshot below:

use

in use

I'm using AMH hosting panel and I don't know if anyone has encountered a similar situation. After checking, optimizing, and repairing without success, I had to seek help from fellow netizens. Finally, with the help of a kind-hearted netizen, I was able to solve this problem. I want to share and record this experience, and I'm really grateful to this friend.

The reason for this is insufficient permissions, so we need to reassign the permissions. Use an SSH tool and enter "chown mysql:mysql -R /usr/local/mysql/" and press Enter, then enter "chown mysql:mysql -R /data/mysql/" and press Enter. This way, the permissions will be reassigned.

Open phpMyAdmin again and switch to the database. Select the tables that are "in use" and click "Repair table" at the bottom. Finally, the data tables should return to normal. My final suggestion is to always have a regular backup habit. I have learned this lesson the hard way. Otherwise, if the data crashes one day and there is no backup, it will be too late to regret it.


Comments