My calendar items have all disappeared at once, myadmin: Can't open file: 'mdl_event.MYI'. (errno: 145)

My calendar items have all disappeared at once, myadmin: Can't open file: 'mdl_event.MYI'. (errno: 145)

על ידי David Russo בתאריך
מספר תגובות: 6
Hi
Strange issue. First I was trying to log into my moodle (admin) and I kept getting presented with the login page after submitting my login info. This happened on 2 computers, with 2 different logins.
Then after a little while, I was able to successfully login. I tried to add a site event to the calendar, and after submitting the event, the page response had cleared the entire calendar. There was a lot of info in there. If the data is indeed gone, is not clear.
I logged into PHPmyadmin to see what I could understand. Not knowing what records the calendar is in, I saw 'mdl_event' . On the structure TAB it says it's "in use" while all the other fields do not say that. I clicked on 'mdl_event' . The page says:

Database moodleDT - Table mdl_event running on localhost

Can't open file: 'mdl_event.MYI'. (errno: 145)

Error

SQL-query : 

SHOW KEYS FROM `mdl_event`

MySQL said:

#1016 - Can't open file: 'mdl_event.MYI'. (errno: 145)
---------------------
Am I on the right track? This obviously is a problem. What should I do? Under the QUERY TAB, it says:

Error

SQL-query : 

PMA_mysql_list_fields_alternate(  

moodleDT, mdl_event
)

MySQL said:

#1016 - Can't open file: 'mdl_event.MYI'. (errno: 145)
----------------------
Any feedback appreciated, and many thanks in advance.
David Russo
Digital Theater
New College of California
ממוצע דרוגים: -
בתגובה ל: David Russo

Re: My calendar items have all disappeared at once, myadmin: Can't open file: 'mdl_event.MYI'. (errno: 145)

על ידי Martin Dougiamas בתאריך
תמונה של Core developers תמונה של Documentation writers תמונה של Moodle HQ תמונה של Particularly helpful Moodlers תמונה של Plugin developers תמונה של Testers
No problem, you just need to REPAIR that table (and all the tables, just to be safe).   Most likely you will have lost nothing.

The phpmyadmin interface lets you do that ... look under "Operations" to do just one table. For all the tables at once, look for menus under the list of all tables that you get when you click on the database name in the left frame.
בתגובה ל: Martin Dougiamas

Re: My calendar items have all disappeared at once, myadmin: Can't open file: 'mdl_event.MYI'. (errno: 145)

על ידי David Russo בתאריך

The $cfg['PmaAbsoluteUri'] directive MUST be set in your configuration file!

I just noticed this in RED in myadmin. Dunno if it's new or not... I have just looked and can't find any reference or command to REPAIR. When I click the OPERATIONS tab, it says...

Can't open file: 'mdl_event.MYI'. (errno: 145)

Error

SQL-query : 

SHOW COLUMNS FROM `mdl_event` FROM `moodleDT`

MySQL said:

#1016 - Can't open file: 'mdl_event.MYI'. (errno: 145)

בתגובה ל: Martin Dougiamas

Re: My calendar items have all disappeared at once, myadmin: Can't open file: 'mdl_event.MYI'. (errno: 145)

על ידי David Russo בתאריך
Hi again,
I forgot to mention that we have also recently, last week, installed a second moodle, with a separate database on the same webserver, which uses vhosting. Could this have caused a problem? What issues must I be aware of in terms od MySQL processes and making sure both moodles operate properly?
Thanks for all your hard work.
-d
בתגובה ל: Martin Dougiamas

Re: My calendar items have all disappeared at once, myadmin: Can't open file: 'mdl_event.MYI'. (errno: 145)

על ידי David Russo בתאריך
Update,
I logged into mysql from the prompt based on advice from here: http://www.karakas-online.de/forum/viewtopic.php?t=332
But the repair command didn't work right off the bat. I'm working on repairing it. Any tips would be helpful. Also, how did it happen? Could one moodle database be getting confused with another on the same server. The databases are in the same directory of /usr/local/mysql/var
thanks,
david
-----------------------
>
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Didn't find any fields in table 'mdl_event'
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4338 to server version: 4.0.20
בתגובה ל: David Russo

FIXED IT Re: My calendar items have all disappeared at once, myadmin: Can't open file: 'mdl_event.MYI'. (errno: 145)

על ידי David Russo בתאריך
SUCCESS! After using my eyes a little more, and downing a few Hefeweizens, I discovered a pulldown menu with a REPAIR option. I checkboxed the mdl_events table and chose repair, and vwalah.
 
What causes these corruptions? I'm still concerned about the recent addition of another moodle to our server and whether I've configured it properly.
thanks.
בתגובה ל: David Russo

Re: FIXED IT Re: My calendar items have all disappeared at once, myadmin: Can't open file: 'mdl_event.MYI'. (errno: 145)

על ידי Martin Dougiamas בתאריך
תמונה של Core developers תמונה של Documentation writers תמונה של Moodle HQ תמונה של Particularly helpful Moodlers תמונה של Plugin developers תמונה של Testers
MySQL tables can be left in this state if MySQL is suddenly interrupted and not shutdown properly (machine was rebooted or switched off, say).