Project

General

Profile

HowTo convert a database from utf8 to utf8mb4 » History » Version 1

C S, 2021-03-19 12:59
Simple instructions for converting the character set

1 1 C S
h1. HowTo convert a database from utf8 to utf8mb4
2
3
First things you have to do is like an upgrade
4
5
h2. Step 1 - Check requirements
6
7
The first step to upgrading Redmine is to check that you meet the [[RedmineInstall#Requirements|requirements]] for the version you're about to use or install.
8
9
h2. Step 2 - Backup
10
11
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.
12
13
To understand how to back up your Redmine, please read [[RedmineBackupRestore|Backing up and restoring Redmine]].
14
15
h2. Step 3 - Convert
16
17
Actually, the conversion is already done with a single command line
18
19
<pre>
20
<code class="sql">
21
ALTER DATABASE redmine DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
22
</code>
23
</pre>
24
25
If you use an assistant such as _phpMyAdmin_, you can simply select the database there and select the item _Collation_ under the _Operations_ tab.
26
27
The conversion of the character set is now complete.