MyBB Community Forums

Full Version: Your database encoding is 'utf8', should be 'utf8mb4'. Please update your MyBB to use
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
hello

i find this message in ACP

Your database encoding is 'utf8', should be 'utf8mb4'. Please update your MyBB to use UTF-8 everywhere.

how to fix this problem

thank you
The only way is to access your database (console or phpMyAdmin) and run:
ALTER DATABASE databasename CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; (replace databasename with the name of your base)
And for each table in it: ALTER TABLE tablename CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

You can create a query to generate all the queries:
SELECT CONCAT('ALTER TABLE ', table_name, ' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;') as qry FROM information_schema.tables WHERE table_schema = 'databasename';
MyBB has a build in UTF-8 Conversion Tool. There is no need to run SQL queries on your own.
I'm also having this issue with the Google SEO plugin, should i convert it to as the plugin says without any complications?

[attachment=43185]

@stefan, are you talking about this?

[attachment=43184]
(2020-08-12, 02:59 PM)StefanT Wrote: [ -> ]MyBB has a build in UTF-8 Conversion Tool. There is no need to run SQL queries on your own.
Oh yes, I forgot that Smile You're true.

(2020-08-12, 03:12 PM)kbilly Wrote: [ -> ]I'm also having this issue with the Google SEO plugin, should i convert it to as the plugin says without any complications?

@stefan, are you talking about this?
Yes, is speaking about this tool, and you can convert all tables without any trouble, but think to backup your database before, and close your forum.
(2020-08-12, 02:59 PM)StefanT Wrote: [ -> ]MyBB has a build in UTF-8 Conversion Tool. There is no need to run SQL queries on your own.
Explain that please.

I had to convert my site manually. I set the encoding in config but my tables had to be converted for it to work properly.

What tool are you talking about?
admincp - admin/index.php?module=tools-system_health&action=utf8_conversion

Make a backup in any case before performing database conversions.

Google SEO recommended 'utf8' charset before which is outdated. 4-byte UTF-8 characters used to be exotic (some chinese characters and other unusual scripts) but became more prevalent with emoji and stuff.

Also a few years ago it was still common to find outdated MySQL server that didn't even support 4-byte UTF-8. Nowadays it should not be a problem anymore, so the default choice should be utf8mb4, not utf8.

Even if you are not planning on using such characters actively, weird behavior occurs when users post them anyway. Switching to utf8mb4 should resolve that issue.

Even so, if you didn't have issues until now, it's also fine to leave as is. You can ignore this message and treat it as informative.
[Image: attachment.php?aid=43184]

this picture help me
thank you
(2020-08-12, 02:59 PM)StefanT Wrote: [ -> ]MyBB has a build in UTF-8 Conversion Tool. There is no need to run SQL queries on your own.

the tool is doing nothing any ideas?
mysql 8
Remember to change the encoding in inc/config.php too after running the tool.
$config['database']['encoding'] = 'utf8mb4';
Pages: 1 2