Score:0

How to upgrade a MariaDB database to utf8mb4_unicode_ci?

at flag

I have a Drupal 9.4.8 website a MariaDB database and phpMyAdmin.

My website is already active with data in its 220 MB database.

How to upgrade a MariaDB database to utf8mb4_unicode_ci ?

Here is my website setup :

enter image description here

Here is the current database. It's really a mess, because there's utf8_general_ci and utf8mb4_general_ci :

enter image description here

If updating is possible, can it break Drupal ?

ua flag
What version of MariaDB? What character set is currently in use? Questions about MariaDB are better handled in stackoverflow.com or dba.stackexchange.com .
Score:0
jm flag

Following the directions from here, you should be able to get away with

ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4_unicode_ci COLLATE utf8mb4_unicode_ci;

You will need to run this command separately on each table. You will also want to set the parameter character_set_server in your configuration file to make it the default going forward.

Whether or not it breaks drupal is probably dependent on your particular installation. Always back everything up before you make changes and test immediately after the change.

Mathieu avatar
at flag
https://ibb.co/gvLm70m I tried with phpmyadmin, but I have an error and I don't know what to do
Mathieu avatar
at flag
I got 2 errors. An error with the cache and an error with the search index. I followed this tutorial with phpmyadmin https://mariushosting.com/phpmyadmin-how-to-convert-utf8_general_ci-database-to-utf8mb4_unicode_ci/ my salvation was just to clear cache and search index. Now all the tables and my columns are in utf8mb4_unicode_ci My question, should I restore my Database because there were errors or you are ok.
Mathieu avatar
at flag
With each error corrected I redid step 6 of the tutorial. Until all tables and columns are in utf8mb4_unicode_ci is this good practice or should I restore? This is my first database update.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.