Need help getting cacti configured

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

Moderators: Developers, Moderators

Post Reply
tspec
Posts: 10
Joined: Tue Nov 15, 2005 10:56 pm

Need help getting cacti configured

Post by tspec »

I'm trying to get cacti running on Ubuntu 5.10 with PHP5, I've come across this error (actually a heap of them on the same page) when trying to view http://localhost/cacti/
Warning: mysql_connect() [function.mysql-connect]: Access denied for user: 'cacti@localhost' (Using password: YES) in /usr/share/adodb/drivers/adodb-mysql.inc.php on line 338
I understand that to fix this error I need to add the following to /usr/share/cacti/site/include/config.php ???
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cacti";
$database_password = "cacti_password";
My question is where abouts do I need to include this information in this file? I can't seem to find any example config.php files on the net, I added the above straight into the file underneath:
db_connect_real($database_hostname, $database_username, $database_password, $database_default, $database_type);
That was a no go, and I also tried adding it as:
db_connect_real($database_hostname = "localhost", $database_username = "cacti", $database_password = "cacti_password", $database_default = "cacti", $database_type = "mysql");
which doesn't seem to work either.... keep in mind I've never touched the PHP language before so any help would be appreciated.
elnino
Cacti User
Posts: 205
Joined: Tue Mar 08, 2005 9:51 pm

Post by elnino »

Do you have php-mysql installed? Do a php -m and see if mysql is listed. If you already have it installed, then take a look at the first post in this forum about disabling SELinux.
tspec
Posts: 10
Joined: Tue Nov 15, 2005 10:56 pm

Post by tspec »

thanks. It is installed, I had a quick look for the SELinux file, couldn't find it. From googling around (and looking at the first post in this thread), it appears to only be associated with Fedora Core and as mentioned I'm running Ubuntu 5.10 so the problem remains.

it most likely filters back to the errors i was getting earlier on with the initial part f the cacti install:
gumby@x800tx:/$ mysqladmin --user=root create cacti
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: NO)'
I haven't figured out how to kill this error either, I can't seem to find much information around about it.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Need help getting cacti configured

Post by gandalf »

tspec wrote:I understand that to fix this error I need to add the following to /usr/share/cacti/site/include/config.php ???
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cacti";
$database_password = "cacti_password";
No, cactid has it's own config file. This is searched in the cactid binary path first, then in /etc and perhaps some more locations. Myself, I decided to put it into /etc/cactid.conf. It contains some similar entries as those above. There's an example in the download package for cactid.
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest