Error while configuring Monitoring IDO resource

Hi Team,

i’m new on this tool. I have successfully installed and almost configuration is completed but while performing Monitoring IDO resource page im getting the below error. Kindly help me on this. It’s really very urgent.
Validation Log

Connection failed SQLSTATE[HY000] [1044] Access denied for user ‘icinga2@localhost’@’%’ to database ‘icinga2’

Regards,
Pranav R N

The username should just be “icinga2”, not “icinga2@localhost”.

Antony.

Hi Antony,

Yes i tried both but it’s not working…

create user icinga2@localhost identified with mysql_native_password by “password”;
Query OK, 0 rows affected (0.11 sec)

alter user ‘icinga2@localhost’ IDENTIFIED WITH mysql_native_password BY ‘password’;
Query OK, 0 rows affected (0.10 sec)

mysql> create database icinga2;
Query OK, 1 row affected (0.27 sec)

Could you please help me on this.

“Connection failed SQLSTATE[HY000] [1044] Access denied for user
‘icinga2@localhost’@’%’ to database ‘icinga2’”

tells you that you are trying to connect with username “icinga2@localhost”
and this does not match what you have in your database (I’m pretty certain you
cannot have an @ sign in a username anyway).

So, you do not need to modify the user table of your database - you need to
correct the username which is trying to access that database.

Go back to the configuration steps you have performed and see where you entered
“icinga2@localhost” for a username. That is what needs changing.

Antony.

please try … ‘icinga2’@'localhost’ …

Hi Antony,

Yes i checked in the configuration and i haven’t provided the this ‘icinga2@localhost’ user name. Below are the details in the .conf file.

/**

  • The db_ido_mysql library implements IDO functionality
  • for MySQL.
    */

library “db_ido_mysql”

object IdoMysqlConnection “ido-mysql” {
user = “icinga2”,
password = “Icinga@123”,
host = “localhost”,
database = “icinga2”
}

Yes i tries but no luck. Please help me on this.

Hi Antony,

Please help me on this.

Regards,
Pranav R N

Hi Antony,

Sorry, but I am not your personal assistant - this is a mailing list / forum
with many people who can help out, and many of us also have day jobs (which I
am doing right now).

Please help me on this.

Assistance from everyone here is provided on a “best effort” basis, and you’ve
already had suggestions from both myself and Roland.

You should specifically pay attention to Roland’s correction of the punctuation
in your SQL statement, and let us know what happens after you have applied
that.

Antony.

1 Like

Hi Antony,

Sure thanks for the reply.

Finally i’m able to connect to the DB but however i’m again getting another error and below is error details.

Cannot find the IDO schema. Please verify that the given database contains the schema and that the configured user has access to it.

Can anyone is having this issue please help me.

Regards,
Pranav R N

Creating database means creating an empty one. You need to create the schema with

mysql -u root -p icinga2 </usr/share/icinga2-ido-mysql/schema/mysql.sql

You’ll be asked for the MySQL root password.

1 Like

Please show us the URL of the instructions you are following and tell us which
stage you are at when this error occurs.

Antony.

Hi Roland,

Thanks a lot for your inputs. The issue has been resolved after creating the schema which you have provided.

Hi Antony,

Thanks a lot for your suggestion and help to resolve this issue.

Regards,
Pranav R N

Hey @pranavrn - if your topic is resolved, please also make sure to mark the response that helped you solve it as the “solution” by clicking the three dots on that message.

1 Like