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’)
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’;
THe the command to import the Icinga 2 schema for our MySQL.
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
I switched database from local to on a seperate server and added its entry in ido conf file…when i log in to database server and enter into database, i don’t see any tables in icinga2…where as i can see these in 2 master nodes.
That is to be expected. Icinga2 doesn’t automatically create the schemas for the databases.
Why don’t you dump the database on the local node and import it to the remote one? This way you would keep all the data.
In case you really want to start fresh:
Icinga2 ido-mysql feature setup: Features - Icinga 2
If you are talking about Icinga WEB 2, see the post above.