Posts

Showing posts from August, 2011

MySQL Database corrupted and can not be repaired

I tried to use SQL Command to reparid the table. Unfortunately all attempts failed because following error: MYD file not found (Errcode:2) In order to fix it, look for the file  /mysql/schema/tablename.TMD . Simply rename this file to tablename.MYD. If for some reason there is already an MYD file rename the TMD file to BKP. Once that's done, run a: REPAIR TABLE schema.tablename;  If that doesn't work you may have to simply drop the table and restore from a backup. From http://www.hmailserver.com/documentation/latest/?page=howto_repair_mysql

Got problem about MySQL: .MYD' not found (Errcode: 2)

After half an year working perfectly, this morning I found one of my database stopped to response. After checking the error, I found following error {MySql.Data.MySqlClient.MySqlException (0x80004005): File '.xxxxx.MYD' not found (Errcode: 2)    at MySql.Data.MySqlClient.MySqlStream.OpenPacket()    at MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId)    at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet()    at MySql.Data.MySqlClient.MySqlDataReader.NextResult()    at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)    at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader()    at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()    at CWShared.NDMySql.SetSellerCrawlTime(Int32 iProductSN, Int32 iSellerSN, DateTime dLastUpdate)} After searching a little bit, the following page provides the answer: http://dev.mysql.com/doc/refman/5.0/en/myisam-crash-recovery.html