Centreon Forum  

Go Back   Centreon Forum > Centreon Use > Setup

Setup For all questions about Centreon Setup

Reply
 
Thread Tools Display Modes
  #1  
Old 17th March 2010
Noosymer Noosymer is offline
Member
Newbie
 
Join Date: Jul 2007
Posts: 47
Default Database connections errors in centstorage.log

Hello,

I recently installed Centreon and it works except the graphs.

I followed some instructions to fix it and I found these errors in: /usr/local/centreon/log/centstorage.log

Code:
17/3/2010 17:39:20 - Error when connecting to database : Access denied for user 'centreon'@'localhost' (using password: YES)
17/3/2010 17:39:20 - Error when connecting to database : Access denied for user 'centreon'@'localhost' (using password: YES)
Can't call method "prepare" on an undefined value at /usr/local/centreon/lib/verifyHostServiceIdName.pm line 62.
17/3/2010 17:39:22 - Error when connecting to database : Access denied for user 'centreon'@'localhost' (using password: YES)
Could you help me fix that issue?

Thanks.
Reply With Quote
  #2  
Old 18th March 2010
NutZ NutZ is offline
Senior Member
Habituated
 
Join Date: Apr 2008
Posts: 110
Default

First: check in /etc/centreon/conf.pm the name of your centstorage database user ($mysql_database_ods value).

Then check that user's privileges in MySQL for your centstorage database. He should have full privileges (including "grant").
__________________
Debian Lenny: Centreon 2.1.5 / Nagios 3.2.1 / NDO 1.4b9 / Nagios Plugins 1.4.14
Modules: PhpWeatherMap / Centreon Syslog / CentreonDiscovery
Reply With Quote
  #3  
Old 18th March 2010
Noosymer Noosymer is offline
Member
Newbie
 
Join Date: Jul 2007
Posts: 47
Default

Quote:
First: check in /etc/centreon/conf.pm the name of your centstorage database user ($mysql_database_ods value).
My database user is centreon

Quote:
Then check that user's privileges in MySQL for your centstorage database. He should have full privileges (including "grant").
here is the result:
+-----------------------------------------------------------------------------------------------------------------+
| Grants for centreon@localhost |
+-----------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'centreon'@'localhost' IDENTIFIED BY PASSWORD 'XXXXXXXXXXXXXXXXXXXX' |
| GRANT ALL PRIVILEGES ON `centreon`.* TO 'centreon'@'localhost' WITH GRANT OPTION |
| GRANT ALL PRIVILEGES ON `centstorage`.* TO 'centreon'@'localhost' WITH GRANT OPTION |
| GRANT ALL PRIVILEGES ON `centstatus`.* TO 'centreon'@'localhost' WITH GRANT OPTION |
+-----------------------------------------------------------------------------------------------------------------+

Thanks
Reply With Quote
  #4  
Old 18th March 2010
Noosymer Noosymer is offline
Member
Newbie
 
Join Date: Jul 2007
Posts: 47
Default

Ok, it seems to be my database password that cause the issue.

I have a "@" in my password and apparently it doesn't like this character so I am trying to find how to change my database password...
Reply With Quote
  #5  
Old 18th March 2010
Noosymer Noosymer is offline
Member
Newbie
 
Join Date: Jul 2007
Posts: 47
Default

I changed my password in mysql but now I have an error once logged in to Centreon on some pages (not all):

Connection failed, please contact your administrator.

I have changed the password also in some config files but apparently not all...

If someone knows in which config files do I need to replicate the modifications, that would be very helpful.

Thanks,
Reply With Quote
  #6  
Old 23rd March 2010
Noosymer Noosymer is offline
Member
Newbie
 
Join Date: Jul 2007
Posts: 47
Default

No one?

Please.
Reply With Quote
  #7  
Old 23rd March 2010
tosage tosage is offline
Member
Habituated
 
Join Date: Mar 2010
Location: Haute-Normandie
Posts: 92
Default

hy,

Have you modify the /etc/centreon/contreon.conf.php too ?
Reply With Quote
  #8  
Old 24th March 2010
Noosymer Noosymer is offline
Member
Newbie
 
Join Date: Jul 2007
Posts: 47
Default

Hi,

Yes, I have modified this one.

I have modified these config files:
  • /etc/centreon/conf.pm
  • /etc/centreon/centreon.conf.php
  • /usr/local/nagios/etc/ndo2db.cfg
Reply With Quote
  #9  
Old 24th March 2010
AkHeNaToN AkHeNaToN is offline
Administrator
Gourou
 
Join Date: Jul 2008
Location: France - Val de Marne (94)
Posts: 2,443
Default

For this file : /usr/local/nagios/etc/ndo2db.cfg please use Centreon (menu "Configuration -> Centreon -> ndo2db.cfg" sheet "Database").
__________________
Syslog Module Team
Centreon E2S developper
App: Nagios 3.2.1 / NDO SVN / Centreon 2.1.8 / Centreon-Syslog 1.3.2 / Centreon E2S 1.1-RC2
OS: Ubuntu / Debian / CentOS
Reply With Quote
  #10  
Old 25th March 2010
Noosymer Noosymer is offline
Member
Newbie
 
Join Date: Jul 2007
Posts: 47
Default

That fixed it!

Thank you so much, it works now!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 23:16.