Repair mysql databases Εκτύπωση

  • 96

Cpanel provides tools to fix corrupt mysql tables. But if you server does not have control panel here are the commands that you need to check to fix your databases tables.

Repairing MyISAM mySQL Tables/Databases:

cd /var/lib/mysql/DBNAME
#Please note that we assume your mySQL data directory is /var/lib/mysql

myisamchk *.MYI

Repairing ISAM mySQL Tables/Databases:

cd /var/lib/mysql/DBNAME
#Please note that we assume your mySQL data directory is /var/lib/mysql

isamchk *.MYI

The second method is to run the mysqlcheck command-line utility. The syntax is:

mysqlcheck [options] dbname tablename [tablename2... ].

The following options pertain to checking (mysqlcheck can also repair, as well as analyze and optimize)

For ex.

mysqlcheck -r databasename
mysqlcheck -o databasename


Η απάντηση ήταν κατατοπιστική?

« Πίσω