Error message 'Table ‘icingaweb.icingaweb_user’ doesn’t exist'

Hi everyone,
I’m getting this error when finishing the config of ICINGA:

Zend_Db_Statement_Exception in /usr/share/icingaweb2/library/vendor/Zend/Db/Statement/Pdo.php:225 with message: SQLSTATE[42S02]:
Base table or view not found:
1146 Table ‘icingaweb.icingaweb_user’ doesn’t exist, query was: SELECT COUNT(*) AS cnt FROM icingaweb_user WHERE (name = ‘admin’)

Can someone help me?
Thank you!

Hi and welcome!

The error state that you are missing a table in your icingaweb database, which most like comes from not having imported the db schema during setup.

Normally the setup wizard of the webinterface should take care of that.
You can import it afterwards manually as well.

Folder (for Debian/Ubuntu, others might differ):
/usr/share/icingaweb2/etc/schema
If it is a fresh setup do
mysql -u <database user> -p icingaweb < /usr/share/icingaweb2/etc/schema/mysql.schema.sql

If you have a running setup a did updates then you will have to import all schemas after the version you updated from found in the /mysql-upgrades

Hi @log1c, I’m running CENTOS7 in VM.

The steps i performed ar as below:
yum install icinga2-ido-mysql
mysql -u root -p
CREATE DATABASE icinga;
GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE VIEW, INDEX, EXECUTE ON icinga.* TO ‘icinga’@‘localhost’ IDENTIFIED BY ‘icinga’
CREATE DATABASE icingaweb;
GRANT ALL PRIVILEGES ON icingaweb.* TO ‘icingaweb’@‘localhost’ IDENTIFIED BY ‘icingaweb’;
FLUSH PRIVILEGES;
EXIR;

THe the command to import the Icinga 2 schema for our MySQL.

mysql -u root -p icinga < /usr/share/icinga2-ido-mysql/schema/mysql.sql
icinga2 feature enable ido-mysql
systemctl restart icinga2

nope, wrong one :wink:

You are missing the schema for Icinga Web 2
Table ‘icingaweb.icingaweb_user’ doesn’t exist
----------- ^^^^^^^^^^

This is a separate database only for the web interface

Go from here again: CentOS - Icinga Web

You most likely will have to enable the setup module again with icingacli module enable setup

The web setup will guide you through the process. When configuring the database for Icinga Web 2 make sure to input the correct database connection settings. If the setup then can’t import the schema with the data supplied it will ask for a privileged user (e.g. root)

Some time back I posted an overview of the communication of Icinga and its components. It might help you understand a bit better :slight_smile: