The problem is now solved and it was something very small.
The password that I chose for the webworkWrite user in the database contained an '@' symbol which is a protected character in perl. So when this password is entered into global.conf as follows:
$database_password = "xxxx@yyyy"; (for example)
This causes a problem in perl because of how perl interprets double quotes. When double quotes are used (as it has been explained to me), perl tries to evaluate the expression inside the double quotes. Specifically, it tries to see if the expression inside the double quotes contains any variables. The @ symbol starts a variable in perl so in the above expression, perl thinks there is a variable called @yyyy within my password. This caused all of my database connection errors after this.
The fix was simply to rewrite the line as
$database_password = 'xxxx@yyyy';
with single quotes. This way perl did not try and look for any variable names within the password. (Another possible fix might have been to escape the @ symbol in the password ...)
After this I deleted the webworkWrite user from the database and then recreated it just be sure that there would be no password issues. Problem fixed :)
It might be a good idea (?) if the line in global.conf.dist might say
$database_password = ''; (with just single quotes).
Having not much knowledge of perl or mysql, I had no idea that this would/could be a problem.
Thanks for all the help,
WeBWorK Main Forum
creating admin course
This forum has a limit to the number of forum postings you can make in a given time period - this is currently set at 10 posting(s) in 1 day