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?
We have lot of experiences with OTRS and Znuny and can help you with your issues. Get in touch with us and we will check if and how we can help you.

Leave a Comment

Do you need help with Znuny / OTRS?​

We have lot of experiences with OTRS and Znuny.
We can help you with your issues to solve them.

From giving you support up to implementing integrations to your existing systems.

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