MySQL-Schema Upgrade fails from 2.10.1 to 2.11.1

Hi Folks,
I try to upgrade Icinga2-2.13.3 and IcingaWeb2-2.10.1 to Icinga2-2.13.5-1 and IcingaWeb2-2.11.1.

I’m running on CentOS 7.9 with: mariadb-server-5.5.68-1.el7.x86_64 and
mariadb-5.5.68-1.el7.x86_64.

After a successful yum update, I try to upgrade the DB schema according to the Upgrading to Icinga Web 2.11.x guide.

The error I’m getting is:

mysql -u root -p icingaweb2 < /usr/share/doc/icingaweb2/schema/mysql-upgrades/2.11.0.sql

Enter password:

ERROR 1071 (42000) at line 8: Specified key was too long; max key length is 767 bytes

According to line 8 of the schema upgrade 2.11.0.sql its:

ALTER TABLE icingaweb_group_membership CONVERT TO CHARACTER SET utf8mb4;

What does it mean and how can I fix that?

Many thanks in advance!

Best resgards
David

It seems that adding the following mariadb parameters solves the problem:

/etc/my.cnf:

innodb_file_per_table=true
innodb_large_prefix=1
innodb_file_format=Barracuda

mysql -u root -p icingaweb2 < /usr/share/doc/icingaweb2/schema/mysql-upgrades/2.11.0.sql
Enter password:

No errors appeared.

1 Like

@theFeu
Do you experience the same bug after the schema update and the fix?

Many thanks in advance!

Best regards
David