During the setup of a new Moodle server I got an error that the database was not UTF8. To fix this in MySQL command line: ALTER DATABASE mydatabasename charset=utf8;