Let's see how to 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, run this command to check the desired database:

mysqlcheck -r [your-database-name]

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


3.  In case, if the above command does not work, you can use "myisamchk" command:

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

where,
myisamchk command is the default storage engine for MySQL and will check the database.
-r will repair the corrupted tables of the database.
Was this answer helpful? 0 Users Found This Useful (0 Votes)