1 (edited by proweb 2008-01-13 09:24)

Topic: HELP! Database reported: Can't open file: 'users.MYI'. (errno: 145)

I just got the following error from my main forum:

An error was encountered
File: /home/site/public_html/forum/include/functions.php
Line: 45

PunBB reported: Unable to fetch user information 

Database reported: Can't open file: 'users.MYI'. (errno: 145) (Errno: 1016)

Does anybody have any ideas???

2 (edited by proweb 2008-01-13 08:52)

Re: HELP! Database reported: Can't open file: 'users.MYI'. (errno: 145)

I also tried a DB dump and received:

mysqldump: Can't get CREATE TABLE for table `users` (Can't open file: 'users.MYI                                '. (errno: 145))
[~]#


First, how do I fix this?

Second, what could have caused it??

Re: HELP! Database reported: Can't open file: 'users.MYI'. (errno: 145)

Okay, I found a bandaid:  http://forum.virtuanews.co.uk/index.php?showtopic=419

I went into PhpMyAdmin and repaired the DB and it worked.   In the thread above the guy said it happened one last time and when he repaired it killed everything.   I TOTALLY don't need this to happen to me.

Any idea what caused it and how I can guarantee it doesn't happen again?

Thanks way in advance for any suggestions.

Re: HELP! Database reported: Can't open file: 'users.MYI'. (errno: 145)

Keep backups so if it happens again and you lose data you could restore from them

http://dev.mysql.com/doc/refman/5.0/en/ … table.html

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

Re: HELP! Database reported: Can't open file: 'users.MYI'. (errno: 145)

Thanks Smartys, I keep daily backups in 3 locations, but when this happened it was 3 hours before my next backup was going to start... basically meaning that I'd loose a whole day's worth of posts (about 1,500) which would be bad news.

What causes this to happen?  Anything at all I can do to prevent it?

Re: HELP! Database reported: Can't open file: 'users.MYI'. (errno: 145)

There's no one cause of table corruption, it can be any number of things (eg: killing the server in the middle of a query, random MySQL oddness, etc). You could change all of the tables from MyISAM to InnoDB, but there's a tradeoff in terms of speed.

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize