Every so often, MySQL tables are one of the very crucial database tables which usually get corrupt due to multiple reason. MySQL do offers a quick as well as painless procedure for repairing those tables. Previously you have to login to your web hosting server via SSH. As soon as you get in to your server make the necessary such as; change directories to the database that have the error with in the table. From the below mentioned command the location gets into the database folder.
¦ Table ¦ Op ¦ Msg_type ¦ Msg_text ¦
¦ db_name_doc.searchindex ¦ check ¦ error ¦ Key in wrong position at page 4096 ¦
¦ db_name_doc.searchindex ¦ check ¦ error ¦ Corrupt ¦
¦ itdocs_wiki.searchindex ¦ check ¦ error ¦ Key in wrong position at page 4096 ¦
¦ db_name_doc.homepage ¦ check ¦ error ¦ Key in wrong position at page 4096 ¦
The Usual database location on your server is being located on the server such as cd /usr/local/mysql/var/[DataBaseName]/
The administrator must take care to replace the [DataBaseName] with the real or we can say your’s actual database name for necessary changes.
First of all you have to stop the MySQL server, the below mentioned command will help you to stop the server “mysql stop”
The administrators who has created there accounts before July 7th, 2003 will want to use:
/etc/rc.d/init.d/mysqld stop as previously to stop the mysql service the administrator where using “mysqld stop”.
The below mentioned command will help you to check the tables:
The most important part of it is to repair the Mysql tables: The below mentioned command will help the administrator to complete repair the entire stuff.
myisamchk -r *.MYI
/etc/rc.d/init.d/mysql start (Restart MySQL services)
Important Note: The administrators who has created there accounts before July 7th, 2003 will want to use:
As an alternative, if you wanted to shut down MySQL, you can use mysqlcheck.
The above command will defiantly help you to check the post regarding the table errors.
To repair the database tables:
mysqlcheck -r [DataBaseName]
You will need to replace [DataBaseName] with the actual name of your database.
If you want to more about How to Connect to the MySQL using the Command Line