Problem at creating admin course

Problem at creating admin course

by Douglas Brown -
Number of replies: 2
After a successful install on a Ubuntu server at home, I am attempting to install 2.4 on a campus server running CentOS5 and have installed all modules, etc. The base WeBWorK page is up and running and all seems well until I try to create the admin course by running:

# /opt/webwork/webwork2/bin/addcourse admin --db-layout=sql_single --users=adminClasslist.lst --professors=admin

At that point I get the following error at the terminal:

DBD::mysql::db do failed: Specified key was too long. Max key length is 500 at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/ line 812

At WeBWorK, the Course Administration link appears and the login screen comes up, but when I try to login with "admin" and "admin" I get:

Warning -- there may be something wrong with this question. Please inform your instructor including the warning messages below.

Invalid user ID or password.

Please enter your username and password for admin below:

If you check Remember Me your login information will be remembered by the browser you are using, allowing you to visit WeBWorK pages without typing your user name and password (until your session expires). This feature is not safe for public workstations, untrusted machines, and machines over which you do not have direct control.


Remember Me

WeBWorK Warnings

WeBWorK has encountered warnings while processing your request. If this occured when viewing a problem, it was likely caused by an error or ambiguity in that problem. Otherwise, it may indicate a problem with the WeBWorK system itself. If you are a student, report these warnings to your professor to have them corrected. If you are a professor, please consult the warning output below for more information.

Warning messages

  • failed to open /opt/webwork/courses/admin/logs/login.log for writing: Permission denied at /opt/webwork/webwork2/lib/WeBWorK/ line 719.
The only unusual part of the installation is that my IT department runs a central MySQL server and created the database "webwork" there (with appropriate permissions as per your installation manuals) and gave me username "webwork" as well - the only lines I changed in global.conf relative to the database are:

$database_dsn = "dbi:mysql:webwork;";
$database_username = "webwork";
$database_password = "appropriate password eneered here";

Any help anyone can provide would be greatly appreciated.

D. K. Brown
In reply to Douglas Brown

Re: Problem at creating admin course

by Michael Gage -

Look at the post at
and see if that helps.

As you suspect the problem has to do with the default settings of the
mySQL databases being used. You might check the versions of your mySQL
installation and the installation on the campus server.

The second error is less serious. Check the permissions on

and make sure that the webserver can read and write to that file.

It's easiest if the webserver owns that file.

In reply to Michael Gage

Re: Problem at creating admin course

by Douglas Brown -

Thanks - we are running 4.0.27, so it sounds like a similar problem to the thread you directed me toward. The IT folks let me go ahead and install a more recent MySQL (5.x) on the webwork server and that took care of the problem. I'm having a problem now with image generation when creating a homework set, but I've seen some threads that might clear that up.

Thanks again,