View FAQ

[ Return To FAQ Index | Search The FAQs ]

FAQ Database : Nagios : Error and Warning Messages

Title:Error: Could not connect to MySQL database
FAQ ID:F0228
Submitted By:Guillaume Lefranc 
Last Updated:01/08/2005

Description:On a nagios installation compiled with MySQL support, when launching the nagios daemon, the following message is issued to system log :

[hostname] nagios: Error: Could not connect to MySQL database '' on host '' using username '' and password ''. Status data will not be saved! 

Solution:The configuration files located in /etc/nagios must be owned by the same user/group that the daemon is running under. After copying/editing the files with a regular user account, issue the following command (with default user/group configuration) :

chown -R nagios.nagios /etc/nagios/ 

Keywords:mysql database connect error