Database keeps using utfmb4 instead of utf8
So it looks like when the server variables are set, they don't change the database that had already been created before. So what I did was to:


Set the server variables as shown in the question.
Verify that they are now as expected as shown in the question.
Recreate the database again, and check that the database encoding and collation is correct.