Upgrade 5.0 to 6.0: utf8 vs utf8mb4

Moderator: crythias

Post Reply
hkais
Znuny expert
Posts: 298
Joined: 16 Apr 2016, 08:55
Znuny Version: see in post
Real Name: Hans
Contact:

Upgrade 5.0 to 6.0: utf8 vs utf8mb4

Post by hkais »

Hi there,

having an very odd issue and caused some years ago with the encoding.

Code: Select all

sudo -u otrs scripts/DBUpdate-to-6.pl

Migration started ... 
Checking requirements ... 
    Requirement check for: Check framework version ...
    Requirement check for: Check required Perl version ...
    Requirement check for: Check required database version ...
    Requirement check for: Check database charset ...

    Error: The setting character_set_database is set to 'utf8mb4'.
    Error: This character set is not yet supported, please see https://bugs.otrs.org/show_bug.cgi?id=12361.
    Error: Please convert your database to the character set 'utf8'.
on one of the last major updates maybe from 4 to 5 I have upgraded the database too. And with this I have switched from latin to utb8mb4 encoding.
Was a bunch of work the time. I decided to use utf8mb4, since it was the more suggested encoding.

Now I am facing the error on upgrade, that the mariaDB recommended encoding utf8mb4 shall not be used.
And thus confused.

Is it also a requirement for znuny 6.1/6.2 and ongoing to use the outdated encoding? So maybe I could skip the encoding change with upgrade to 6.0?

Also really curious
is my information wrong, that it is recommended since 2010 to use utfbmb4 since mysql developers have forgotten that 3 bytes are not enough for full UTF-8 support?
if my info is right, why it is the upgrade limited to outdated utf8?

What is recommended here in my case?
Can I somehow circumvent the "downgrade" of utf8mb4 to utf8?
And if so, is it for later znuny version also okay?
Last edited by hkais on 13 Feb 2022, 18:41, edited 1 time in total.
Elected 2022-06 as an IT Governance Portal Expert. The portal for Znuny, OTRS and OTOBO users
root
Administrator
Posts: 4012
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Upgrade 5.0 60 6.0 utf8 vs utf8mb4

Post by root »

Hi,

Right now utf8 is required for MySQL/MariaDB and I would never use utf8mb4.
Even if the MySQL developer recommend using another character set it's the applications requirement.
Clearly stated in the manual, also in older version:
2022-02-12 at 11.17 AM.png
Until today (MySQL/MariaDB) utf8 is the required character set and this might change in the future. Up to version 6.2 and the upcoming 6.3 utf8mb4 can't be used.

- Roy
You do not have the required permissions to view the files attached to this post.
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
hkais
Znuny expert
Posts: 298
Joined: 16 Apr 2016, 08:55
Znuny Version: see in post
Real Name: Hans
Contact:

Re: Upgrade 5.0 60 6.0 utf8 vs utf8mb4

Post by hkais »

for other with similar issues what I did to switch to right encoding

Code: Select all

mysql -u root -p 
ALTER DATABASE otrs CHARACTER SET utf8 COLLATE utf8_general_ci;
check result

Code: Select all

SELECT default_character_set_name FROM information_schema.SCHEMATA WHERE schema_name = "otrs";
Elected 2022-06 as an IT Governance Portal Expert. The portal for Znuny, OTRS and OTOBO users
Post Reply