Invalid or corrupt MySQL table

asked Jun 2, 2012 in Database by carebare (1,420 points)
Hi there,

when I run any query I get a error message telling me that I have a corrupt or invalid MySQL table. I checked my tables and everything looks fine. Can someone please tell me what should I do?


2 Answers

0 like 0 dislike
answered Jun 2, 2012 by FixHost (12,380 points)
do the following;
1.Use SSH to login to MYSQL server
2.From shell prompt type’’mysqlcheck—auto-repair[database name]
3.This utility will now run automatic check and repair in the specified database and it will report results.
0 like 0 dislike
answered Jun 2, 2012 by expert (14,380 points)
if your working on a Linux server, try this code at the shell cd /var/lib/mysql/[database name]
myisamchk -r *.MYI