I get the error “Monitoring Backend not running” in the Icinga web interface.
icinga2.log shows:
[2024-08-20 22:44:44 +0200] critical/IdoMysqlConnection: Exception during database operation: Verify that your database is operational!
[2024-08-20 22:44:54 +0200] critical/IdoMysqlConnection: Connection to database ‘icinga2’ with user ‘icinga2’ on ‘localhost:3306’ failed: “Access denied for user ‘icinga2’@‘localhost’ (using password: YES)”
Context:
(0) Reconnecting to MySQL IDO database ‘ido-mysql’
When I do “validate” under Monitoring Backend settings, though it seems to be able to connect fine:
Validation Log
Connection to icinga2 as icinga2 on localhost: successful
have_ssl: DISABLED
protocol_version: 10 version: 10.11.6-MariaDB-0+deb12u1
version_compile_os: debian-linux-gnu
Same goes when I manually connect to the database via commandline, works fine:
: mysql -u icinga2 -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 40
Server version: 10.11.6-MariaDB-0+deb12u1 Debian 12
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
MariaDB [(none)]> use icinga2;
Database changed
MariaDB [icinga2]> show tables;
±---------------------------------------+
| Tables_in_icinga2 |
±---------------------------------------+
| icinga_acknowledgements |
| icinga_commands |
| icinga_commenthistory |
| icinga_comments |
| icinga_configfiles |
[…]
Why can’t icinga daemon connect to the db when the webinterface test can and it’s also working on the commandline?