Mysql & Cacti Problems!
Moderators: Developers, Moderators
Mysql & Cacti Problems!
I upgraded cacti to 8.e.f for som weeks ago, and now I get theese errors
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
-
I have looked in my config.php and I dont even have a cactiuser
cacti should run on a other user, but when I change, i'll still get this problem.
I have never had this problem so I dunno whats wrong! Thats why I need your help
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: YES) in /usr/local/share/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
-
I have looked in my config.php and I dont even have a cactiuser
cacti should run on a other user, but when I change, i'll still get this problem.
I have never had this problem so I dunno whats wrong! Thats why I need your help
per the docs, it indicates that you create a cacti db and import the schema. In the process of doing so, you should have granted perms on the dabase
See items 4 & 5 on http://www.cacti.net/downloads/docs/htm ... _unix.html
cactiuser is just a suggestion, it can be anything as long as you indicate the same values in include/config.php. [mysql may puke on some special characters, though]
Bar none, Cacti has to be one of the easiest bandwidth/snmp monitoring tools to install, not to mention one of the best
Re-read the above url and follow it closely, you will have Cacti up & running in no time.
See items 4 & 5 on http://www.cacti.net/downloads/docs/htm ... _unix.html
cactiuser is just a suggestion, it can be anything as long as you indicate the same values in include/config.php. [mysql may puke on some special characters, though]
Bar none, Cacti has to be one of the easiest bandwidth/snmp monitoring tools to install, not to mention one of the best
Re-read the above url and follow it closely, you will have Cacti up & running in no time.
OK,
I typically do this from a root prompt (#)
adduser cactiuser (for dir & file ownership, not db functions)
# mysql -pyour-password
now, you are in mysql as admin
mysql -u cactiuser -psomepassword cacti < cacti.sql
NOTE: the somepassword must be the same as above. It will fail at this step if you do not specify the db username & pass that has rights to the cacti db in mysql. DO NOT give the cactiuser rights to all the databases in mysql, just cacti
now edit the cacti/include/config.php file
That should give you everything you need to start the web install. Be sure to check the perms/ownership on the log & rra directories.
I really cannot be any more clear than that. Cacti and pretty much all other
monitoring sw requires some underlying knowledge of the web, db servers & associated sw
I typically do this from a root prompt (#)
adduser cactiuser (for dir & file ownership, not db functions)
# mysql -pyour-password
now, you are in mysql as admin
Code: Select all
mysql>
mysql>create database cacti;
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';
quit;
NOTE: the somepassword must be the same as above. It will fail at this step if you do not specify the db username & pass that has rights to the cacti db in mysql. DO NOT give the cactiuser rights to all the databases in mysql, just cacti
now edit the cacti/include/config.php file
Code: Select all
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "password from step above";
I really cannot be any more clear than that. Cacti and pretty much all other
monitoring sw requires some underlying knowledge of the web, db servers & associated sw
-
- Posts: 8
- Joined: Tue Jul 26, 2005 1:57 am
Hmmm... I am experiencing a similar issue, but I do not find a file name db-settings.php in the include/ folder. Which version of cacti are you using?
Brian
Brian
nyhusern wrote:Got it working again! In FreeBSD you only need to change the file db-settings.php in include/ folder. Now everything is up and running as the good old days
adodb-mysql line 339
I'm having exactly the same issue here.
Many lines of
followed by
From config.php
I'm able to log into mysql at the command line with cactiuser and the db password specified in config.php
Any suggestions?
Many lines of
Code: Select all
Warning: mysql_connect(): Access denied for user: 'cactiuser@localhost' (Using password: NO) in /var/www/localhost/htdocs/cacti/lib/adodb/drivers/adodb-mysql.inc.php on line 339
Code: Select all
Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
From config.php
Code: Select all
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "db password here";
Code: Select all
mysql -u cactiuser -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2479 to server version: 4.0.24
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
hmmmm. I am not used to gentoo, so I do not know then. But if gentoo does compile after downloading, and you dont have to type make, make install, configure etc. Then it should be much like BSD in order. Right after the install you should read the info, there it will be written what you need to do in the gentoo os. Good Luck
After some back and forth on the bug tracking list for Gentoo, I managed to determine that, at least in Gentoo, the use of the $ character is not supported for the password. Not sure if there are others, but I'm rather hoping that gets fixed as I much prefer being able to use special characters in passwords
I've got the interface up and running now... now all I need to get working is the damned graphing
I've got the interface up and running now... now all I need to get working is the damned graphing
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
If it's not SELINUX, then you need to verify what version of mysql you are running. If it's 4.1.x, you need to enable old password support and things will work just fine.
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Who is online
Users browsing this forum: No registered users and 3 guests