≡ Menu

How to Check and Repair a MySQL Database Through Console SSH

mysql logoHere is step by step explanation on How to Check and Repair a MySQL Database Through Console SSH with Mysqlcheck and Myisamchk are similar in purpose, there are some essential differences. Mysqlcheck as well as Myisamchk can check, repair and analyze MyISAM tables. Mysqlcheck can also check InnoDB tables.

step 1: Log in as ‘root’ via SSH and:
step 2: Shows you if any need repair:

step 3: Recover MySql Database
try ‘safe-recover’ first:

and, if neither that nor this works:

Then use the ‘force’ flag:

If those are not MyISAM tables try Mysqlcheck:

to repair one database:

to repair one table in database:

ref: vps.net

{ 1 comment… add one }
  • shorf.com September 1, 2016, 7:21 am

    Got broken all databases suddenly , these tips helped me to fix them , thanks mate.

Leave a Comment

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.