I have been trying to get this to work for months now, I started on an OS 10.4.8 machine and ended up moving to ubuntu since I am a little more familiar with linux then unix. I still cannot get cacti up and running although I am now pretty sure that this has to do with adodb.
This message has been cross posted from the ubuntu forums
Hello there everyone recently I have run into some issues trying to get cacti installed on my Ubuntu 6.10 server at work. I was originally trying to get it to run an old G4 Power Mac, however repeated failure at getting graphs to display and a mysql.sock to create has led me back to linux.
So I decided to install cacti just like I would on any other system. First I got LAMP running. (all commands are run as root)
apt-get -u install apache2
apt-get -u install mysql-server
apt-get -u install php4
So now I have apache2 php4 and mysql5 all up and running and by the looks of phpinfo() all playing happily together. So I decided to try installing cacti.
apt-get -u install cacti
cacti pulls down and installs (along with some dependencies like dbconf-common, php4-snmp etc). dbconf offers to configure it for me but I decline, as I would rather do it myself.
So now that everything is installed I get to configuring mysql. First I create the cacti database
mysqladmin -u root create cacti
now I create a user to admin that databse
useradd cactiuser -p userspassword
I head back into mysql and grant that user permissions to the table
(console)mysql -u root
(mysql)GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'userspassword';
Looks good to me so far so I head to /usr/shared/cacti/site/include/config.php and add
$database type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "userspassword";
after that I quickly change the ownership or rra and log to cactiuser
chown -R cactiuser ./log ./rra
Now I dump a quick symbolic link in the www root and I'm good to go
ln -s /usr/share/cacti/site cacti
done and done, now I run a quick test just to make sure the user is able to connect to the database.
mysql -u cactiuser -h localhost -p cacti
success, it logs into the mysql client and I am able to show tables; and see the cacti table.
So I point my browser to http://localhost/cacti
and I get the following error..
Warning: mysql_pconnect(): Access denied for user 'www-data'@'localhost' (using password: NO) in /usr/share/php/adodb/drivers/adodb-mysql.inc.php on line 372
hmmmm ok, I'm not exactly the most familiar with ado but I decided to take a look at it anyways, line 372 of adodb-mysql.inc.php reads
$this->_connectionID = mysql_pconnect($argHostname,$argUsername,$argPassword,$this->clientFlags);
ummm ok back to being a n00b because I don't know what that means nor how to go about fixing it. thanks for bearing with my lengthy explanation, and thank you in advance for any help you guys are able to provide.