HowTo convert a mysql database from utf8 to utf8mb4¶
First things you have to do is like an upgrade
Step 1 - Check requirements¶
The first step to upgrading Redmine is to check that you meet the requirements for the version you're about to use or install.
Step 2 - Backup¶
It is recommended that you backup your database and file uploads. Most upgrades are safe but it never hurts to have a backup just in case.
To understand how to back up your Redmine, please read Backing up and restoring Redmine.
Step 3 - Convert database and tables¶
When using a database with a current mySQL version, the conversion is already done with a single command line
More information about this topic, including how to convert the tables can be found:ALTER DATABASE redmine DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
- https://docs.nextcloud.com/server/20/admin_manual/configuration_database/mysql_4byte_support.html
- https://percona.community/blog/2018/06/12/character-sets-migrating-utf8mb4-pt_online_schema_change/
If you use an assistant such as phpMyAdmin, you can simply select the database there and select the item Collation under the Operations tab.
The conversion of the character set is now complete.
Step 4 - Redmine configuration¶
Change in the file config/database.yml in the Redmine folder:
encoding: utf8mb4
Updated by Marius BĂLTEANU 12 months ago · 5 revisions