Database problem (Illegal mix of collations)

Started by dan4ever, June 14, 2024, 11:52:17 AM

Previous topic - Next topic

dan4ever

Hi

I'v problems with "Illegal mix of collations".
My forum are in Swedish and when I use mods (what I think!)  are made for the english market, the database are changing between "latin1_swedish_ci", utf8mb3_general_ci and utf8mb3_swedish_ci.

I'm getting error when using the forum like this:
Illegal mix of collations (utf8mb3_swedish_ci,IMPLICIT) and (utf8mb3_general_ci,IMPLICIT) for operation 'like'
Fil: /home/guldforu/domains/guldforum.se/public_html/forum/Sources/ManageBans.php
Rad: 2396

Are there a better way to keep the Db intact over time?
Maybe it change when upgrading ????  I don't know.....

/Dan
/Dan Olsson, Webmaster at https://www.guldforum.se

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

dan4ever

#2
Quote from: Kindred on June 14, 2024, 12:19:04 PMWhat version of smf?
SMF 2.1.4

What is the default collations for SMF 2.1.4???   ( If I use Swedish! )
/Dan Olsson, Webmaster at https://www.guldforum.se

shawnb61

SMF 2.1 ships using utf8mb3_general_ci, which supports Swedish.  I would suggest converting everything to that, the supported configuration.

Some mods build tables on their own, bypassing SMF's processes (which would ensure everything is consistently utf8mb3_general_ci).

The mods that are doing so almost always end up using the database default.  To fix this, set the database default for 2.1 forums to utf8mb3_general_ci.

Take these two steps, and everything will stay consistent going forward.

A question worth asking is born in experience & driven by necessity. - Fripp

shawnb61

Two other important things to check:

- What is the value of $db_character_set in your Settings.php file?  (It should be: 'utf8')
- What is the value of the 'global_character_set' entry in your smf_settings table?  (It should be: 'UTF-8')
A question worth asking is born in experience & driven by necessity. - Fripp

shawnb61

FYI, this is not a bug report.  It should probably be in the support board.
A question worth asking is born in experience & driven by necessity. - Fripp

Steve

DO NOT pm me for support unless asked to!

Advertisement: