PDA

View Full Version : post.MYD gone while optimizing


dellow
Fri 6th Jul '07, 2:50pm
Hello

i was making db optimizing but disconnected from ssh while it is working then i get this error :
MySQL Error : Table 'post' is marked as crashed and last (automatic?) repair failed
Error Number : 1195


when i try to repair :
mysql> repair table post;

i recive this error :
--------------+
| onanet_3633.post | repair | error | File './DB_name/post.MYD' not found (Errcode: 2) |
+------------------+--------+----------+---------------------------------------- --------------+

when i go to:
cd /var/lib/mysql/DB_name/

i found all tables with three extintions exipt post table there is tow files only that are :
post.MYI post.frm



when i check table list in phpmyadmin it show post table (in use)


now where is post.MYD table ? and why it gone ? and any chance to recover it ?

last backup DB i have is 10 days old.


i need help please.


Regards,

jason|xoxide
Fri 6th Jul '07, 3:51pm
The ".MYD" files are what actually contain your data. If that file is missing then the data from the `post` table is gone. It seems to me that you're going to need to restore from a backup.

dellow
Sat 7th Jul '07, 2:49am
Thank you for your reply,

but why this file/table deleted while i am optimizing the DB ? should i make backup befor i do optimization ?

eva2000
Sat 7th Jul '07, 9:50am
usually repairing won't delete the actual data file itself.. it may delete corrupted data if it can't be repaired (one method of repair) but the actual data file should remain intact.

does anyone else have access to the server ? any errors or problems prior to repair/optimisation ?

looks like you will need to restore the whole database from backup sql file (don't just restore one table).