This morning I saw this message on my Drupal website:
Basically it was saying “user warning: Table ‘semaphore’ is marked as crashed and should be repaired”, and that previous attempts to repair it automatically failed. Therefore manual intervention is required.
So here’s how to do it via terminal
First login your server.
Make a backup first before you screw anything up.
sudo mysqldump -u username -p [name_of_database] > [name_of_database_dump]
Then, login mysql.
sudo mysql -u username -p
Enter your password. Now, if you don’t remember your database name use this to find it:
show databases;
Mine is ‘mom13jun13’, so:
use mom13jun13;
If you don’t remember the table name, use:
show tables;
The crashed table is ‘semaphore’, so let’s check it. We already know it’s crashed but here’s how to see the report:
check table semaphore;
Now to repair it:
repair table semaphore;
and voila:
check table semaphore;
now quit mysql:
quit;
I check the website and the warning sign is gone:




