set db to utf8mb4 without SSH [Deleted]

gouwepeer.nl

Well-known member
gouwepeer.nl submitted a new resource:

set db to utf8mb4 without SSH - utf8mb4 without SSH in phpmyadmin

If you want to convert you're database from utf8 to utf8mb4 without SSH you can do it in phpMyAdmin.
Login on phpMyAdmin and select the XF database. After that pres on "SQL" and copy&past this code:

SQL:
ALTER TABLE xf_addon CONVERT TO CHARACTER SET utf8mb4   COLLATE utf8mb4_unicode_ci;
ALTER TABLE xf_addon_install_batch CONVERT TO CHARACTER SET utf8mb4   COLLATE utf8mb4_unicode_ci;
ALTER TABLE xf_admin CONVERT TO CHARACTER SET utf8mb4   COLLATE utf8mb4_unicode_ci;
ALTER TABLE...
Read more about this resource...
 

Chris D

XenForo developer
Staff member
Have you actually tested this? Because it very likely doesn't work how you think.

First and foremost, this converts the collation of the tables but it does not convert the individual fields. As a result, if you attempt to enter an emoji into a post, this will be the result:

198978

Finally, we wouldn't recommend using the exact collation you mentioned, simply because that's not the one that we use so it would leave your database in an unexpected state. We use utf8mb4_general_ci and this mostly is because of slight differences in accent sensitivity where converting certain values will actually be seen as the same when using utf8mb4_unicode_ci.

As a sort of side note, if it was this simple to convert all tables to support multibyte unicode, then we would have recommended that already.

To be clear: the only supported way of converting your schema to support emoji is to use our CLI command. If you do not have SSH access, you are out of luck. If you follow some kind of guide like this, and it goes wrong, the extent of our support will be recommending that you restore from a backup.

Sorry if this sounds harsh, but we'll have to delete the resource if that's ok.
 

gouwepeer.nl

Well-known member
This resource has been removed and is no longer available. The following reason was provided:
This is not a recommended, supported or correct approach to converting your database.
 
Top