I am also having some mysterious troubles adding an admin course to a new WeBWorK installation. My problems seem similar to Brian Camp's issues (see https://webwork.maa.org/moodle/mod/forum/discuss.php?d=5744), but not quite the same.
I'm using Suse 10.2 with Apache 2.2.4 + mod_perl.2.03 compiled from source, and using webwork rel-2-4-dev downloaded via cvs. I've set permissions on directories following the instructions, added a "webworkWrite" user to mysql and set $database_password in global.conf.
My web server is running as "daemon", so when I try creating the admin course using:
sudo -u daemon env WEBWORK_ROOT=/opt/webwork/webwork2 /opt/webwork/webwork2/bin/addcourse admin --db-layout=sql_single --users=adminClasslist.lst --professors=admin
error instantiating DB driver WeBWorK::DB::Driver::SQL for table problem_user: DBI connect('webwork','',...) failed: Access denied for user 'byerly'@'localhost' (using password: NO) at /opt/webwork/webwork2/lib/WeBWorK/DB/Driver/SQL.pm line 65 at /opt/webwork/webwork2/lib/WeBWorK/Utils/CourseManagement.pm line 219
Incidentally, when I just try connecting to the (non-existent) admin course through a web browser, I get the following error message:
error instantiating DB driver WeBWorK::DB::Driver::SQL for table problem_user: DBI connect('webwork','',...) failed: Access denied for user 'daemon'@'localhost' (using password: NO) at /opt/webwork/webwork2/lib/WeBWorK/DB/Driver/SQL.pm line 65 at /opt/webwork/webwork2/lib/WeBWorK.pm line 286
For some reason it seems to be trying to connect as the owner of the process instead of as $database_user (which is set to "webworkWrite").
Any help will be appreciated.