#145 - Table './database_name/table_name' is marked as crashed and should be repair

I was getting below error while accessing one site -
Error in establishing database connection.

Solution :-

1. Make sure SQL service is running on your server.

2. Make sure that you've set correct password for database user in your configuration file.


3. Make sure you've assigned correct user and privileges to database.


4. If you're still receiving the error then please check the error logs. If you're getting error message as below -
#145 - Table './database_name/table_name' is marked as crashed and should be repair.
Then you'll need to repair the database from -

1. cPanel >> MySQL Databases >> Repair Database
OR

2. WHM >> SQL Services >> Repair a MYSQL Database >> Select database >> Repair Database

That did the trick for me!

Note :- If you're unable to get the error logs using 'tail -f /usr/local/apache/logs/error_log' then check the MySQL error logs using 'tail -f /var/lib/mysql/hostname.err'


Was this answer helpful?

 Print this Article

Also Read

How to install MALDET Linux Malware Detect on cPanel Server?

Maldet is a malware detector and scanner for Linux based servers a project designed by R-fx...

How to Re-arrange accounts in WHM?

Please go through the following steps on How to Re-arrange accounts in WHM 1. Go to WHM and...

How to install composer on cPanel server- Locally - inside the user's directory?

Composer is as tool which is used to manage the dependencies between the PHP softwares and...

This webpage is not found - Cannot export database

While exporting the database zip file from cPanel >> phpMyAdmin as well from SSH, I was...

Account Creation Status: failed. A database owner with the name <account-name> already exists.

I have deleted the account from the WHM but while recreating it, I was getting below error...

Powered by WHMCompleteSolution