DiscusWare, LLC.
Download Purchase Contact Us
Home
Support Home Documentation Knowledge Base Support Forums Support Request Advanced Services
topics.gif Topics tree.gif Tree View mods.gif Moderators magglass.gif Search   help.gif Help
mods.gif Register gears.gif Edit Profile members.gif Member List hot.gif New Posts: 1 | 3 | 7 days  

Can't open file: '_search.MYD'. (errn...

DiscusWare Support Forum * Post-installation questions / errors / problems * Posting Messages * Can't open file: '_search.MYD'. (errno: 145) < Previous Next >

Author Message
Top of pagePrevious messageNext messageBottom of page

Lance Lee
Member
Username: Lance

Post Number: 15
Registered: 09-2002

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, November 19, 2002 - 09:53 pm:   Edit Post Print Post

Hi people,

are you able to help advise me on the following problem?

------


INSERT INTO _search (postpage,text,posttime,posttopic,postnum) VALUES (?,?,?,?,?);

Can't open file: '_search.MYD'. (errno: 145)

----------
Top of pagePrevious messageNext messageBottom of page

Kevin P.
Moderator
Username: Paulisse

Post Number: 9749
Registered: 11-1999

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, November 20, 2002 - 08:34 am:   Edit Post Print Post

This MySQL error seems to suggest that one of the files associated with your 'search' database is missing. Each MySQL table has 3 files under the MySQL data directory. For example, these are, for the Support Forum:

sf_search.MYD sf_search.MYI sf_search.frm

In the search table, you can easily rebuild the data through Data Recovery - Search, without losing anything. Thus, the best recovery strategy for this problem is to go to Database Manager, initialize the search table, and then go to Data Recovery and regenerate the search index.

Discus never touches this file directly, so if it indeed was removed, it was probably some kind of human error. It's worthwhile to try to figure out who removed it (someone else with access to your site, your web host, etc.), because while the search table is easily regenerated, had this been your user database that was deleted, that would have been bad news.
Top of pagePrevious messageNext messageBottom of page

Lance Lee
Member
Username: Lance

Post Number: 16
Registered: 09-2002

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, November 20, 2002 - 11:39 am:   Edit Post Print Post

Hi Kevin,

I'v tried your method by starting with Database Manager > initialize search tabe.

however, i encounter this error n' is lost how to go on


quote:

SQL error


Could not execute [SELECT COUNT(*) FROM _search;]: Can't open file: '_search.MYD'. (errno: 145)


Top of pagePrevious messageNext messageBottom of page

Kevin P.
Moderator
Username: Paulisse

Post Number: 9759
Registered: 11-1999

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, November 20, 2002 - 06:51 pm:   Edit Post Print Post

According to a quick search for "mysql 145 MYD" on groups.google.com, it appears that this error code is associated with a crash of the MySQL database, where the table (in this case, the search table) is marked as needing repair. On to mysql.com, where I found:

"4.4.6.7 Using myisamchk for Crash Recovery" http://www.mysql.com/doc/en/Crash_recovery.html

Reading further, to repair a corrupted MySQL table, you apparently need to do a command like:

myisamchk _search

or

myisamchk -m _search

or

myisamchk -e _search

I used the telnet access info you provided to me, and upon running the first command in the appropriate directory I got:

./myisamchk: error: '../var/photobb/_search.MYD' doesn't have a correct index definition. You need to recreate it before you can do a repair

So, a few pages of documentation later, it said to log in to MySQL and run REPAIR TABLE.

CHECK TABLE _search;

This showed 4 error messages.

REPAIR TABLE _search;

This fixed all of the problems, and it's working now.

Note that this was a MySQL problem, and not a Discus problem. MySQL itself got a corrupted table index, for reasons that might be contained in its error logs. And, as you can see, fixing it had nothing to do with Discus, but rather was a matter of running the appropriate MySQL commands.

I post the gory details of this recovery in hopes that it will help future customers who experience a similar problem...
Top of pagePrevious messageNext messageBottom of page

Lance Lee
Member
Username: Lance

Post Number: 17
Registered: 09-2002

Rating: N/A
Votes: 0 (Vote!)

Posted on Wednesday, November 20, 2002 - 10:14 pm:   Edit Post Print Post

thanks Kevin,

from this incident, it is fair to say to MySQL has stability problems?

I wonder if it crashed because of quota exceeded problem (disc space)
Top of pagePrevious messageNext messageBottom of page

Kevin P.
Moderator
Username: Paulisse

Post Number: 9761
Registered: 11-1999

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, November 21, 2002 - 07:54 am:   Edit Post Print Post

You are the first of our customers ever to experience this problem, and there are numerous people using MySQL on some very busy boards. I don't think it's fair to say that MySQL has regularly occuring, reproducible problems, and the procedure to solve this one was essentially just one command.

Based on very limited data but statistically speaking anyway, it's more likely that your web host will accidentally delete your discussion board (4-5 instances of this in the last year that come to mind) than a MySQL table will become corrupt (you are the only one).
Top of pagePrevious messageNext messageBottom of page

astermic
Unregistered guest

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, December 22, 2008 - 04:21 am:   Edit Post Print Post

i have similar kind of problem as above mention all the time due to power failure my database gets crash. to repair the database i used the command
repair table table_name; it's repair the table but the main problem is that if i have 100 data enter on that time and after crash if i run that command it deleted some of the data some time 5 soem time 10 or 20 and some time all the data it deleted . please help me out if there some way to recover the data without loosing .
mysql version is 5.0.41
Top of pagePrevious messageNext messageBottom of page

Roy Murray
Senior Member
Username: Roymurray

Post Number: 278
Registered: 12-2001

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, December 25, 2008 - 08:14 am:   Edit Post Print Post

You need to fix the loosing power problems.
Here is a links to how to repair tables in Mysql 5.
http://dev.mysql.md/doc/refman/5.0/en/mysqlcheck.html#id1731931

Add Your Message Here
Post:
Username: Posting Information:
This is a public posting area. Enter your username and password if you have an account. Otherwise, enter your full name as your username and leave the password blank. Your e-mail address is optional.
Password:
E-mail:
Options: Post as "Anonymous"
Enable HTML code in message
Automatically activate URLs in message
Action:
Download Purchase Contact Us
Feedback  |  Privacy Policy
Copyright © 2005, DiscusWare, LLC, All Rights Reserved