开发者

Cannot do normal select in mysql database

I try to do normal select on database, like select * from xxx limit 0,30.

But I 开发者_如何学编程get this message : ERROR 29 (HY000): File 'tablename.MYD' not found (Errcode: 13)

I try to search the file on mysql datafile folder, and I find it. How can this happen.


Can you access the database using a tool like PhpMyAdmin?

According to this site a full repair should solve it:

mysqlcheck --all-databases --auto-repair -ucojjohealth -p

If that doesn't solve it:

While the above command repairs corrupted databases in most cases, there is a possibility of getting a new error message after this command:

error: File '../diaendomet/users.MYD' not found (Errcode: 2)

If you encounter the above error message, then your database has been corrupted badly. To repair your database in such situations, you will need to use third-party MySQL Database Recovery tools. MySQL Recovery utilities provide advanced, complete, and risk-free database repair applications that repair damaged MySQL database while maintaining the intactness of data. These tools employ high-end scanning mechanisms to comprehensively repair the corrupted MySQL databases. With to-the-point documentation, the tools serve as self-explanatory and repair-centric tools.

Read more: http://www.articlesnatch.com/Article/Resolving-Error-29-In-Mysql-Database/788529#ixzz1OlEpu62A


It looks like the table is corrupt or lost the .MYD file.

Try to repair the table if it is corrupt it can bring back the file - please refer: http://dev.mysql.com/doc/refman/5.0/en/repair-table.html

repair table tablename


Just as an outside chance, are you using different cased name in your select from your create statement.

select * from banana;

is different on case sensitive file systems (ie linux) to:

select * from BANANA;

There is a mysql.cnf option that turns this off.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜