Error: Could not connect to MySQL database
(infor) urko zurutuza
uzurutuza at eps.mondragon.edu
Wed Oct 8 17:45:32 CEST 2003
I`m sorried to say that non of your answers worked well; nagios user has all privilegies in the database, and I've discovered mysql is not the problem, cause logs are completely empty (it does not try even to connect to the database!!)
our config was:
./configure --prefix=/usr/local/nagios --with-cgi-url=/nagios/cgi-bin --with-htmurl=/nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-mysql-xdata --with-mysql-lib=/usr/local/mysql/lib/mysql --with-mysql-inc=/usr/local/mysql/include/mysql --with-mysql-downtime --with-mysql-comments --with-mysql-status --with-mysql-retention --with-mysql-extinfo
-----Mensaje original-----
De: Marc Powell [mailto:mpowell at ena.com]
Enviado el: martes, 07 de octubre de 2003 17:41
Para: (infor) urko zurutuza; nagios-users at lists.sourceforge.net
Asunto: RE: [Nagios-users] Error: Could not connect to MySQL database
One reason I saw this with postgres was because nagios didn't have update rights to the tables themselves. Unfortunately nagios doesn't pass you any database error messages it might get when attempting to update data. I had to use strace to determine the exact cause.
--
Marc
> -----Original Message-----
> From: (infor) urko zurutuza [mailto:uzurutuza at eps.mondragon.edu]
> Sent: Tuesday, October 07, 2003 10:18 AM
> To: nagios-users at lists.sourceforge.net
>
> Hi,
>
> Got a problem with Nagios mysql support. We've been looking some other
> mails but can't find solution:
>
> [10-07-2003 15:20:54] Error: Could not connect to MySQL database 'nagios'
> on host 'localhost' using username 'nagios' and password '********' for
> downtime data!
> [10-07-2003 15:20:54] Error: Could not connect to MySQL database 'nagios'
> on host 'localhost' using username 'nagios' and password '********' for
> comment data!
> [10-07-2003 15:20:54] Error: Could not re-connect to database server on
> host 'localhost' for status data. I'll keep trying every 60 seconds...
> [10-07-2003 15:20:54] Error: Could not connect to MySQL database 'nagios'
> on host 'localhost' using username 'nagios' and password '********'.
> Retention data will not be processed or saved!
> [10-07-2003 15:20:54] Error: Could not connect to MySQL database 'nagios'
> on host 'localhost' using username 'nagios' and password '********'.
> Status data will not be saved!
> [10-07-2003 15:20:54] Finished daemonizing... (New PID=2019)
> [10-07-2003 15:20:54] Nagios 1.1 starting... (PID=2018)
> -----
> OS: RedHat 8
> Versions: Nagios 1.1, mysql 4.0.12
> -----
> We've already chowned/chgrped config-files to nagios user (so that the
> nagios process can read them), and still doesn't work.
> Also, connecting mysql from shell works well:
> >mysql -u nagios -p
> -----
> Config directives in cgi.cfg & resource.cfg:
>
> x-ddb_host=localhost
> #x-ddb_port=someport (takes by default)
> x-ddb_database=nagios
> x-ddb_username=nagios
> x-ddb_password=********
> ...
>
> Can anyone help us???
> Thank you all
> __________________________________________________
> MONDRAGON UNIBERTSITATEA
> Urko Zurutuza
> Dpto. Informática
> Loramendi 4 - Aptdo.23
> 20500 Arrasate-Modragon
> Tel. +34 943 794700 Ext.305
> www.eps.mondragon.edu
> uzurutuza at eps.mondragon.edu
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when
> reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list