Matomo 4 upgrade... DB is in utf8_general_ci, do we need to convert to utf8mb4 before upgrading?

I know I’m super late to this upgrade, but I’m finally doing it & I have a question that might be a bit silly :grin:

From the Matomo 4.0.0 changelog:

Database tables will now use UTF8 encoding (utf8mb4)… Existing Matomo 3.x databases will need to be converted to utf8 manually.

Our DB is in utf8_general_ci. Will we need to run the conversion tool before upgrading? We’re still in UTF8, just not specifically utf8mb4. My guess is we DO need to convert, but just wanted to see if there was an “obvious answer.”

Thanks!

As this question is very technical, I let @innocraft answer you…

Hi @mikky-cecil utf8_general_ci is the collation while utf8mb4 is the character set/encoding. So, you might be using utf8mb4 if you are using utf8_general_ci , but not necessarily. You need to confirm if your character encoding is utf8mb4.

If so you can proceed; if not it may be best to convert to utf8 manually.

1 Like

Oh gosh that explains my confusion, I was looking at the wrong field. :grin:

default_character_set_name = utf8

Upon further reading, it seems like in MySQL (we’re using MariaDB), utf8 is an alias for utf8mb3. So it looks like we aren’t using utf8mb4 & will need to run the conversion script.

Thank you for your help! I knew I was missing something, just wasn’t sure what. :grin:

One more update: Just attempted the conversion & I got the “command doesn’t exist” error, which means I didn’t have to do the conversion after all. Just wanted to update in case anyone reading this had a similar problem!

1 Like