One of my customer’s site stopped working a couple of days ago.
Error displayed on https://laser-clinic.be
SQLSTATE[HY000] [2019] Can’t initialize character set utf8 (path: /usr/share/mysql/charsets/)
Tried to change the following file:
/concrete/config/database.php
Changes:
// The preferred database character set (derived from preferred_collation if empty)
‘preferred_character_set’ => ‘utf8mb3’,
// The preferred database collation (derived from preferred_character_set if empty)
'preferred_collation' => 'utf8mb3_unicode_ci',
// The fallback database character set to be used when the preferred one can't be applied
'fallback_character_set' => 'utf8',
// The fallback database collation to be used when the preferred one can't be applied
'fallback_collation' => 'utf8_unicode_ci',
Thanks for your reply.
Nothing had been changed if I can trust the customer. Meanwhile we finally got somebody from the hosting company on the phone and they succeeded in fixing things fast. No idea what the cause was because I didn’t talk to them unfortunately.
Thanks again for trying to help.
I’ve then gone to the config file at /application/config/database.php, and I’ve changed the charset value from ‘utf8’ to match the charset of the collation. In the case of my screenshot, I’ve changed it to ‘utf8mb3’
after saving that, the site has then come back up and operated as normal