ERROR: Zend_Db_Adapter_Exception in /usr/share/icingaweb2/library/vendor/Zend/Db/Adapter/Pdo/Abstract.php:145 with message: SQLSTATE[HY000] [1045] Access denied for user 'icingaweb2'@'localhost' (using password: YES)

Hello good afternoon, you know that I have the following problem: I installed icinga2 and icinga web2 in debian 10, I followed all the steps and when I reached the end of the configuration of icinga web 2 I got the following error:

I leave what I have in my configuration files to see if they can help me.

/etc/icingaweb2/resources.ini :

[icingaweb_db]
type = “db”
db = “mysql”
host = “localhost”
port = “3306”
dbname = “icingaweb2”
username = “icingaweb2”
password = “mauri”
charset = “”
use_ssl = “0”

[icinga_ido]
type = “db”
db = “mysql”
host = “localhost”
port = “3306”
dbname = “icinga2”
username = “icinga2”
password = “mauri”
charset = “”
use_ssl = “0”

/etc/icinga2/features-available/ido-mysql.conf:

library “db_ido_mysql”

icinga2 feature enable ido-mysql

Module ‘ido-mysql’ was enabled.
Make sure to restart Icinga 2 for these changes to take effect.
object IdoMysqlConnection “ido-mysql” {
user = “icinga2”,
password = “mauri”,
host = “localhost”,
database = “icinga2”
}

/etc/icingaweb2/authentication.ini:

[icingaweb2]
backend = “db”
resource = “icingaweb_db”

Hi @maurox521

When Icinga Web 2 and the database are installed on the same server, it is most likely that you are using an incorrect password for it. Well, which password did you use to create the icingaweb2 user in the database? In the documentation it states as follows , did you change the password CHANGEME?

MariaDB [mysql]> GRANT ALL ON icingaweb2.* TO icingaweb2@localhost IDENTIFIED BY 'CHANGEME';

If yes, then make sure that this password is used in the resources.ini file.