How to fix OTRS/Znuny upgrade error character_set_database utf8

During an upgrade on OTRS 5 and Znuny 6 and above you may get the following error.

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'.

Alternatively you may have something like this or similar:

    Error: The setting character_set_database is set to 'latin1'. 

To change the collation you shall execute a ALTER command on your otrs database. In this example the database is named otrs.

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

your database shall now be on utf8 configured. To check if this is the case you can shall execute

SELECT default_character_set_name FROM information_schema.SCHEMATA WHERE schema_name = "otrs";

Do you need help with Znuny / OTRS?​

Do you require experts with real expertise since 2006 on Znuny and OTRS?
Do you require help on solving your issues?

We have experts who can help you on:
– giving you hands-on support
– implementing  custom solutions inside your OTRS/Znuny
– Integration existing Solutions into your Znuny
– Integrating artificial intelligence into your Znuny7OTRS and proce3sses

Get in touch with us and we will check if and how we can help you.​

Leave a Reply