Nagios 'could not connect' to MySQL database
Richard.Luys at vanderlet.nl
Richard.Luys at vanderlet.nl
Tue Aug 16 12:57:35 CEST 2005
I know, this sounds like a newbie question, but unfortunately it seems a
bit more complex...
First let me tell you about the configuration:
Novell Suse Linux Enterprise Server 9, 64-bit version
MySQL Ver 14.7 Distrib 4.1.12 for unknown-linux-gnu (x86_64) using
readline 4.3
Nagios 1.2 compiled with --with-mysql-xdata option; no errors.
All of this is installed on the same hardware...
Nagios.cfg and resource.cfg contain the necessary credentials to connect
to the database. Connecting to the database with these credentials is
succesfull (both logged in as root and as nagios).
When I check the nagios.log I get the following errors:
[1123752497] Finished daemonizing... (New PID=26747)
[1123752497] Error: Could not connect to MySQL database 'nagios' on host
'localhost' using username 'nagios' and password 'removed'. Status data
will not be saved!
[1123752497] Error: Could not connect to MySQL database 'nagios' on host
'localhost' using username 'nagios' and password 'removed'. Retention
data will not be processed or saved!
[1123752497] Error: Could not re-connect to database server on host
'localhost' for status data. I'll keep trying every 60 seconds...
[1123752497] Error: Could not connect to MySQL database 'nagios' on host
'localhost' using username 'nagios' and password
'removed' for comment data!
[1123752497] Error: Could not connect to MySQL database 'nagios' on host
'localhost' using username 'nagios' and password
'removed' for downtime data!
As I said, the provided host, database, username and password are
correct. I can use them with the mysql-client to connect to the
database, and use SELECT and INSERT statements succesfully.
It looks like nagios cannot find the database; the MySQL-logging does
not show any connection attempts from the Nagios-process... Port (3306)
is used, and telnet localhost 3306 works fine.
Who helps me out?
Thanks in advance and best regards,
VANDERLET B.V.
R. (Richard) Luys
This e-mail message and its attachments are subject to the disclaimer published at the following website of VANDERLET: http://www.vanderlet.nl/disclaimer
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
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