WeBWorK Main Forum

MySQL problems

MySQL problems

by Douglas Brown -
Number of replies: 3
Well, everything was going along fine and working well. Today I got home and tried to log in to check student progress and got this:

WeBWorK error

An error occured while processing your request. For help, please send mail to this site's webmaster (root@localhost), including all of the following information as well as what what you were doing when the error occured.

Wed Sep 02 18:04:46 2009

Warning messages

Error messages

DBD::mysql::st execute failed: Incorrect key file for table './webwork/Math1100-01_key.MYI'; try to repair it at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 812.

Call stack

The information below can help locate the source of the problem.

  • in WeBWorK::DB::Schema::NewSQL::Std::handle_error called at line 410 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
  • in WeBWorK::DB::Schema::NewSQL::Std::_get_fields_where_prepex called at line 378 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
  • in WeBWorK::DB::Schema::NewSQL::Std::get_fields_where called at line 438 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
  • in WeBWorK::DB::Schema::NewSQL::Std::get_records_where called at line 738 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
  • in WeBWorK::DB::Schema::NewSQL::Std::gets called at line 760 of /opt/webwork/webwork2/lib/WeBWorK/DB.pm
  • in WeBWorK::DB::getKeys called at line 755 of /opt/webwork/webwork2/lib/WeBWorK/DB.pm
  • in WeBWorK::DB::getKey called at line 595 of /opt/webwork/webwork2/lib/WeBWorK/Authen.pm
  • in WeBWorK::Authen::check_session called at line 380 of /opt/webwork/webwork2/lib/WeBWorK/Authen.pm
  • in WeBWorK::Authen::verify_normal_user called at line 227 of /opt/webwork/webwork2/lib/WeBWorK/Authen.pm
  • in WeBWorK::Authen::do_verify called at line 150 of /opt/webwork/webwork2/lib/WeBWorK/Authen.pm
  • in WeBWorK::Authen::verify called at line 290 of /opt/webwork/webwork2/lib/WeBWorK.pm


This happens for any course I try to access. Any thoughts?

Doug

In reply to Douglas Brown

Re: MySQL problems

by Michael Gage -
Doug,

Run a search for MYI in the box next to the "search forums" button.

Some the posts that come up report the same problem you have. It's clear that it stems from a malfunction of mySQL, possibly due to a system crash, such as when a log file grew too big.

On a quick reading there is not a clear procedure to fix it, but working directly with mySQL other folks have been able to succeed. If at all possible back up the table where the mySQL data is stored first so that things don't get worse.

The series of posts should at least get you started and might lead you to some post in mySQL land that says exactly what to do. (In which case report the link back to this forum for next time. :-)

Hope this helps.

-- Mike
In reply to Douglas Brown

Re: MySQL problems

by Boyd Duffee -
Had this problem yesterday with another piece of software and you have to repair the table. There are three options, two of which are to run the myisamchk utility on the command line while the server is offline or use the sql command REPAIR TABLE at the mysql prompt.

Looks like you need to repair Math1100-01_key.MYI. They suggest making a backup of the table first.

Here's one of the forum posts I found. I went with REPAIR TABLE because I needed to keep the database running. My repair took 6 long minutes.

hth,
Boyd