CMDPHP: Poller[0] FATAL: Cannot connect to MySQL server

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

Moderators: Developers, Moderators

Post Reply
colchaodemola
Posts: 17
Joined: Sun Feb 18, 2007 11:09 am

CMDPHP: Poller[0] FATAL: Cannot connect to MySQL server

Post by colchaodemola »

I have tried everything i can imagine i cant find a way to make cacti work.
Everything goes ok , i install , log as admin , change admin password , add a host.
But when i try to graph something i get:

01/15/2009 09:03:20 PM - CMDPHP: Poller[0] FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
Warning: Cannot modify header information - headers already sent by (output started at /usr/share/cacti-0.8.6j/lib/functions.php:380) in /usr/share/cacti-0.8.6j/include/auth.php on line 31


everything is in the right place.
mysql is running ..

# mysqladmin -u nobody -p ping
Enter password:
mysqld is alive

# cat include/config.php

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


# netstat -panute |grep 3306
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 104 503941 3119/mysqld

cacti table is there on the sql server ...

any idea will be really helpful.

Running debian arm and cacti 0.86j
liung
Posts: 47
Joined: Mon Aug 18, 2008 3:28 am

Post by liung »

I didn't use 0.86j . So I don't if it is use .
For my database , I modfiy both include/config.php and include/global.php . I think you can have a try .

Then you can check whether the "nobody" user have the right privilege to operation the cacti database .

Hope can some help :)
colchaodemola
Posts: 17
Joined: Sun Feb 18, 2007 11:09 am

Post by colchaodemola »

It has write permission on the table . otherwise i could not even get to the first login page. So , the problem is some place else.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Do you use the adodb supplied with cacti or a debian one?
Reinhard
colchaodemola
Posts: 17
Joined: Sun Feb 18, 2007 11:09 am

Post by colchaodemola »

i have no idea, i installed cacti by myself , i did not use apt.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Any patches or plugins? This problem is at least not known yet ...
Reinhard
colchaodemola
Posts: 17
Joined: Sun Feb 18, 2007 11:09 am

Post by colchaodemola »

No patches at all. It is a basic installation.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

php-mysql is in place?
Reinhard
Trexpsy
Posts: 4
Joined: Thu Oct 15, 2009 8:47 am

Post by Trexpsy »

In Ubuntu i solved this by purging cacti and installed it again. Be sure to choose the correct httpd (apache2)

apt-get purge cacti
rm /etc/cacti -rf
rm /usr/share/cacti -rf
apt-get install cacti (choose apache2)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests