WeBWorK Main Forum

switching to trunk

switching to trunk

by Hal Sadofsky -
Number of replies: 4

I just tried to switch our test server from 2.4.5 with patches (via csv) to the trunk version with svn.

The svn installation seemed to go correctly with the right bits landing in the right places with appropriate permissions. (I did have to also use CPAN to get Tie::IxHash, but then I could restart apache2 with no problem.)

But when I log into a course, I get this error:

DBD::mysql::st execute failed: Unknown column 'merge1.enable_reduced_scoring' in 'field list' at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 814.


I see this documented in another thread, with the sensible suggestion to log into the admin course and upgrade courses. So I tried this, but this also doesn't work. For each course I get the report (after upgrading courses)


problem_user Schema and database table definitions do not agree
Field problem_seed => is ok
Field sub_status => missing in database

and

set_user Schema and database table definitions do not agree
Field enable_reduced_scoring => missing in database

and logging into courses continues to produce the "Unknown column 'merge1.enable_reduced_scoring'" error.

So it looks like the upgrade courses option is not successfully changing the mysql database.

Does anyone have some insight about what is going on? Luckily it isn't urgent for our test server, but I'd like to be able to do this for our production server in December.

thanks, Hal
In reply to Hal Sadofsky

Re: switching to trunk

by Michael Gage -
Hi Hal,

The most likely problem is what you have diagnosed -- that the webserver doesn't have permission to ALTER the tables in mysql. Otherwise clicking the "upgrade course" button should come back with the enable_reduced_scoring field added.

I use this line to set up the webwork database inside mysql:

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, INDEX, LOCK TABLES ON webwork.* TO webworkWrite@localhost IDENTIFIED BY 'passwordRW';

You can use it to reset the permissions for webworkWrite.
I don't know immediately how one determines the current permissions of webworkWrite, but I'm sure that can also be obtained -- probably from the "mysql" database in mysql.

Hope this helps. Let us know if this works or if it's something else.

Take care,

Mike


In reply to Michael Gage

Re: switching to trunk

by Hal Sadofsky -

Thanks Mike, this makes sense.

I bet I need the password to the root account on the mysql server to do this, no?

(One would think that I'd have this, but the server was set up by someone else, who no longer works for the university, so it may be a trick to get it.)

-Hal
In reply to Hal Sadofsky

Re: switching to trunk

by Andras Balogh -
You can reset the root password after starting up mysqld with the --skip-grant-tables option.
In reply to Hal Sadofsky

Re: switching to trunk

by Hal Sadofsky -

OK, I never know whether to followup when my problem turns out to be mostly my own stupidity, but just in case:

1) The "upgrade courses" option in the admin course is a tiny bit confusing. When you choose that option, you get a list of courses to upgrade, and link at the bottom of the list saying "upgrade courses."

If you click on that link, it _doesn't_ actually upgrade the courses yet - it shows you in more detail what is wrong, and it turns out that at the bottom of this detailed report, you have to click "upgrade courses" once more to actually have it take effect.

I didn't notice this for a very long time...

2) Thanks to Mike's help, I did find the appropriate password for mysql, but it it didn't help since that wasn't the problem.

3) I had an unrelated problem. When upgrading via svn, I did that as a non-root user who had write privileges to the webwork directories. Whether because of that, or for some other reason, group and ownership were not preserved. As a result, apache couldn't write to /opt/webwork/webwork2/tmp, which also causes problems of a different sort.

Thanks Mike and Andras for the help!

-Hal