MySQL/Cacti Issue

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
Ryahn
Posts: 1
Joined: Sat Jan 04, 2014 1:53 pm

MySQL/Cacti Issue

Post by Ryahn »

I am having issues trying to get cacti to connect to mysql. I am pretty sure its setup right, as I used the phpmyadmin. Everytime I try to visit the cacti install via the IP, I get the following:

Code: Select all

FATAL: Cannot connect to MySQL server on ''. Please make sure you have specified a valid MySQL database name in 'include/config.php'
I have checked the config file and everything is correct from my understanding.

Code: Select all

<?php
/*
 +-------------------------------------------------------------------------+
 | Copyright (C) 2004-2011 The Cacti Group                                 |
 |                                                                         |
 | This program is free software; you can redistribute it and/or           |
 | modify it under the terms of the GNU General Public License             |
 | as published by the Free Software Foundation; either version 2          |
 | of the License, or (at your option) any later version.                  |
 |                                                                         |
 | This program is distributed in the hope that it will be useful,         |
 | but WITHOUT ANY WARRANTY; without even the implied warranty of          |
 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           |
 | GNU General Public License for more details.                            |
 +-------------------------------------------------------------------------+
 | Cacti: The Complete RRDTool-based Graphing Solution                     |
 +-------------------------------------------------------------------------+
 | This code is designed, written, and maintained by the Cacti Group. See  |
 | about.php and/or the AUTHORS file for specific developer information.   |
 +-------------------------------------------------------------------------+
 | http://www.cacti.net/                                                   |
 +-------------------------------------------------------------------------+
*/

/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cacti1";
$database_password = "****";
$database_port = "3306";
$database_ssl = false;

/* Default session name - Session name must contain alpha characters */
#$cacti_session_name = "Cacti";
Not sure if it matters. I used lighthttpd since I have nginx installed on the server.
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Re: MySQL/Cacti Issue

Post by Linegod »

And you can actually login with that user and pasword:

# mysql -ucacti -p***** cacti
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests