COLLATION 'utf8mb4_bin' is not valid for CHARACTER SET 'latin1'

COLLATION 'utf8mb4_bin' is not valid for CHARACTER SET 'latin1'

by Ken Task -
Number of replies: 1
Picture of Particularly helpful Moodlers

Error:

COLLATION 'utf8mb4_bin' is not valid for CHARACTER SET 'latin1'

Attempting to use language customization - Eng, Eng (US) - latest language packs - loaded fine, but when accessing the form/filter to search for the phrase to edit/change, the error above thrown!   Huh?  What?

DB for the moodle set to utf8mb4 character set and collation utf8mb4_unicode_ci (not bin) - defaults for server same ... can't find anything in the DB settings for utf8mb4_bin NOR latin1.  MySQL 5.5.59 at present ... soon to be upgraded.

After 4 hours of following google links for that error, finally found the little nugget of gold ...

added to my.cnf

character_set_client_handshake=false

restarted mysqld ... fixed ... not a bug.

Don't think that setting anywhere in Moodle docs ... but then again ... how many customize the language pack? :|

This posting offered in 'the spirit of sharing' ... just in case anyone else would happen to run into such a strange error.

In thinking about it (not trying to overthink), yep ... makes sense ... browser is a 'client'

Ken


Average of ratings: Useful (1)
In reply to Ken Task

Re: COLLATION 'utf8mb4_bin' is not valid for CHARACTER SET 'latin1'

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

The character set and collation handling in MySQL is - shall we say - not one of its best features. I have had loads of weird problems over the years and I like to think that I (more or less) understand how it works.