moving to MariaDB

Re: moving to MariaDB

by Alex Jordan -
Number of replies: 4

After going down too many roads to recount here, I was able to return my server to using mysql 5.7 and I will just leave it at that for now. Shout out to Danny who helped me out.

In the end, I completely reinstalled mysql. Then I placed a backup of my /var/lib/mysql folder back in place at /var/lib/mysql. It appears that with active courses and new courses, things are working.

However now when I unarchive an old course, it has database structure errors and won't initially load. I can use the admin course to update the course I unarchived. But the course has lost its users and problem sets. I had to use the command line wwsh to add myself back into the course, where I can get in to see that these things are missing. Files form the course are still there, it's just the database elements that are gone.

A less concerning issue is that I seem to not be able to use extended characters. I tried creating a course where the title had an em dash — in its title. There was no error, but then that course's title appeared with some accented letter a in place of the em dash. So character encoding is not behaving as hoped for.

In reply to Alex Jordan

Re: moving to MariaDB

by Danny Glin -

I can't offer too much help since my system is still running 2.14, and I haven't braved the migration to UTF8.

It sounds like there is something going on with the character sets between your existing courses and the new version of WeBWorK.

There are two pieces to this:

  1. Changing the default character set for the database
  2. Changing the tables themselves to use the new character set (utf8mb4)

There are two ways to accomplish this:

  1. By manually following the instructions at
  2. Using the script, which can be found in the /opt/webwork/webwork2/bin directory

I recommend doing a mysqldump of your whole database before trying any of these changes, as it is possible that some of these adjustments to the database may be hard to undo if need-be.

In reply to Alex Jordan

Re: moving to MariaDB

by Alex Jordan -
This more serious issue I have (about archiving/unarchiving courses) seems now to be separate from my recent databse woes. I am experiencing the same thing on two other 2.16 servers. Either something is not right with version 2.16, or I have failed to update database configuration settings in the right way.

On my 2.16 servers, if I attempt to archive a course, I get:

Warning messages

Use of uninitialized value $var in hash element at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/ line 285.

The same error message comes up if I attempt to unarchive a course. (Which is the main issue that led me to start this thread, but at the time I thought that was a symptom of my attempt to move to MariaDB.)
In reply to Alex Jordan

Re: moving to MariaDB

by Michael Gage -

I'm using webwork-2.16 in a docker container and I can't duplicate the error you are seeing when archiving.  I don't see a warning on the  html page and I don't see a warning in the apache logs either.