How to Repair MySQL Database Tables In Cpanel Servers

Is your SQL Database down in Cpanel due to tables crash? Restarted sql service and still no use? Restarted server and still no use? Try following the below method and it may help you to overcome the problem. Its not like, this solution is going to solve any type of sql tables and works for all. This may work only to few people. 

Solution 1

Run following commands by logging into SSH.

1) Stop SQL Service
/etc/rc.d/init.d/mysql stop

2) Repair all SQL databases
myisamchk -r /var/lib/mysql/*/*.MYI

3) Start mysql again:
/etc/rc.d/init.d/mysql start

Solution 2

mysqlcheck –all-databases -r #repair
mysqlcheck –all-databases -a #analyze
mysqlcheck –all-databases -o #optimize

Hoping this solution worked for you!
  • 0 Utilizadores acharam útil
Esta resposta foi útil?

Artigos Relacionados

How to Solve "failed to open session lockfile: FILE=/var/cpanel/sessions/raw/"

This tutorial may help you to solve this problem if you face this type of errors while logging...