Can't upgrade Database on 2.17

Can't upgrade Database on 2.17

by Tim Alderson -
Number of replies: 2

Upgraded from 2.16 to 2.17 on Ubuntu 20.04 using the instructions at 

Most seems to have gone smoothly, but in the very last step, > , executing "./" throws an error:

You need to set the WEBWORK_ROOT environment variable.\n at ./ line 20.
BEGIN failed--compilation aborted at ./ line 23.

Now it is impossible for anyone to login via the web. Upon attempting to login the error reported is as follows:

Error record identifier


Warning messages

  • It looks like the database is missing a column. You may need to upgrade your course tables. If this is the admin course then you will need to upgrade the admin tables using the script. at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/ line 876.

Error messages

DBD::mysql::st execute failed: Unknown column 'set_id' in 'field list' at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/ line 881.

Call stack

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

  • in WeBWorK::DB::Schema::NewSQL::Std::handle_error called at line 469 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/
  • in WeBWorK::DB::Schema::NewSQL::Std::_get_fields_where_prepex called at line 437 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/
  • in WeBWorK::DB::Schema::NewSQL::Std::get_fields_where called at line 497 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/
  • in WeBWorK::DB::Schema::NewSQL::Std::get_records_where called at line 796 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/
  • in WeBWorK::DB::Schema::NewSQL::Std::gets called at line 768 of /opt/webwork/webwork2/lib/WeBWorK/
  • in WeBWorK::DB::getKeys called at line 763 of /opt/webwork/webwork2/lib/WeBWorK/
  • in WeBWorK::DB::getKey called at line 786 of /opt/webwork/webwork2/lib/WeBWorK/
  • in WeBWorK::Authen::check_session called at line 529 of /opt/webwork/webwork2/lib/WeBWorK/
  • in WeBWorK::Authen::verify_normal_user called at line 309 of /opt/webwork/webwork2/lib/WeBWorK/
  • in WeBWorK::Authen::do_verify called at line 206 of /opt/webwork/webwork2/lib/WeBWorK/
  • in WeBWorK::Authen::verify called at line 150 of /opt/webwork/webwork2/lib/WeBWorK/
  • in WeBWorK::Authen::call_next_authen_method called at line 203 of /opt/webwork/webwork2/lib/WeBWorK/
  • in WeBWorK::Authen::verify called at line 306 of /opt/webwork/webwork2/lib/WeBWorK.pmHelp would be most appreciated.

Help would be most appreciated. Thanks!
In reply to Tim Alderson

Re: Can't upgrade Database on 2.17

by Danny Glin -
Using any of the command line scripts require that the WEBWORK_ROOT variable be set in your shell (see

If you only run scripts occasionally you can set the variable just for the current session by running
export WEBWORK_ROOT=/opt/webwork/webwork2

followed by whichever script you want to run.
In reply to Danny Glin

Re: Can't upgrade Database on 2.17

by Tim Alderson -

Thanks Danny. Turns out I needed to login as wwadmin instead of my usual account. I can now login successfully, but there are several more issues...I will start a new thread