Continuous error messages, sent to email "SMF could not connect to the database"

Started by parsa, April 14, 2025, 07:37:15 PM

Previous topic - Next topic

shawnb61

I pointed out earlier that mb4 may not work, for this very reason...   (Engine & row format can blow out the index key length...)

You really need to stick with utf8mb3_general_ci.

Get them all to utf8mb3_general_ci.
A question worth asking is born in experience & driven by necessity. - Fripp

parsa

Since I theoretically set all the character sets to utfmb4 using my query, will that be problematic? I didn't see any field in the Operation tab for character set.

By the way, my continuous forum error messages have stopped, so at least I accomplished that much.

Why are those two tables not wanting to go to utfmb4_unicode_ci?

shawnb61

That was explained above.  The engine & row format do not support the SMF db using utf8mb4.  Index key size problem.  (If you need all the background underlying that, Google is your friend.)

There are things you can do to address that, but SMF 2.x doesn't take advantage of utf8mb4, so it's kind of pointless.  I mentioned that earlier as well.

To proceed with utf8mb4, despite the fact that SMF 2.x doesn't use it, you'd need to change all your tables to use the InnoDB engine.  It's possible you need to alter the row format also.  As I mentioned earlier, utf8mb4 is a non-standard configuration, not tested, so you may see issues.  You'd be testing it.

Or you could set everything to utf8mb3, the standard config for 2.x.  For the reasons stated above, this is my recommendation.

Whichever way you go, it is generally recommended to keep all your tables on the same collation & engine.  Inconsistencies can hurt performance.
A question worth asking is born in experience & driven by necessity. - Fripp

parsa

OK, I requested the IT assistant at my host to set the database itself to utf8mb3 character set and collation. I can then use the collation tab in phpMyAdmin to set all the tables to utf8mb3_unicode_ci simultaneously by checking 'Change all tables collations'.
Thanks to everyone here for their assistance. My error message issue seems to be solved, and I learned some things in the process.  ;)

Advertisement: