Icinga2 Director Create Table failed due to MYSQL 8.4.4 with General error: 6125

Dear all,

I just installed Icinga2 with Debian 12 and mysql 8.4.4. My problem is that the creation of the database schema for the director fails due to an error:

During the creation I got the error: Migration 0 failed (SQLSTATE[HY000]: General error: 6125 Failed to add the foreign key constraint. Missing unique key for constraint ‘director_generated_config_activity’ in the referenced table ‘director_activity_log’) while running CREATE TABLE director_generated_config (…

Activity log says: SQLSTATE[42S02]: Base table or view not found: 1146 Table director. “director_generated_config” doesn t exist

I read that this is an problem with mysql 8.4 and greater.

https://dev.mysql.com/doc/mysql-shell/8.4/en/mysql-shell-utilities-upgrade.html

Did anybody solved this?

Thanks a lot

Curious. In most setups we use the Mariadb Server which comes with debian and that works fine.
Are you bound to MySQL?

Thanks for your answer. No, I am not bound to Mysql, I just followed the tutorial.

Could you confirm that with MariaDB this error will disapear?

Thanks for your help.

I can not definitely say that, but I have not yet seen that error with MariaDB from Debian.

Welcome to Icinga and the Icinga Community. I am sorry that your first interaction with it is paired with issues.

Your referenced issue was already reported and one fix was suggested.
Thus, in the meantime I would second @lorenz to try MariaDB.

1 Like