How to Check and repair a corrupted MySQL database on CentOS server using SSH

centos-380x300

Server problems many times can cause corruption of scripts and modules

So now we can see how check & repair MySQL database table through SSH.

Normally we use PhpMyAdmin to manage our MySQL databases.

1. First of all, you have to log in as root using SSH.

2. Now, you have to run this command to check the desired database.

# mysqlcheck -r [your-database-name]

Here, mysqlcheck command will check the database.
-r will repair the corrupted tables of the database.

3.If the above command does not work in any case then you can use myisamchk command:

# myisamchk -r /var/lib/mysql/[your-database-name]/*

 

Here, you should keep this thing in mind that MyISAM is the default storage engine for MySQL.
myisamchk command will check the database.
-r will repair the corrupted tables of the database.

Leave a Reply

Your email address will not be published. Required fields are marked *

0
0,00
Your Cart
No product in the cart

Main Menu