How to repair a database
From WHM:
Go to WHM >> SQL Services >> Repair a Database >> select the database name and click Repair Database.
From cPanel
--------------
Code:
login to cpanel , in Mysql section click on Mysql databases >> MySQL Account Maintenance >> select the database and then click on Repair.
From server via SSH
---------------------
Login to the server via SSH , fire the command
Code:
[root@server ~]# service mysql stop
Now mysqld service is stopped on the server , fire the command
Code:
[root@server ~]# cd /var/lib/mysql/yourDBname
For reapiring MyISAM mySQL tables , fire the command
Code:
[root@server ~]# myisamchk -o *.MYI
For reapiring ISAM mySQL tables , fire the command
Code:
[root@server ~]# isamchk -o *.MYI
You can use following parameters in the above two commands.
Code:
-c –> check database is corrupted or not
-r –> recorver
-o –> optimise the database