Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 101767 - net-analyzer/cacti-0.8.6f-r1 - mysql errors after install
Summary: net-analyzer/cacti-0.8.6f-r1 - mysql errors after install
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-08 10:05 UTC by Tremaine
Modified: 2005-11-05 13:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tremaine 2005-08-08 10:05:51 UTC
After emerge of cacti-0.8.6f-r1, going to the cacti url:

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

Cannot connect to MySQL server on 'localhost'. Please make sure you have 
specified a valid MySQL database name in 'include/config.php'.


From include/config.php 
 

$database_type = "mysql"; 
$database_default = "cacti"; 
$database_hostname = "localhost"; 
$database_username = "cactiuser"; 
$database_password = "db password here"; 
 

I'm able to log into mysql at the command line with cactiuser and the db 
password specified in config.php 

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> 

I'm unable to determine what the problem in line 339 is... 


Anyone?

Reproducible: Always
Steps to Reproduce:
1. Go to cacti URL on server
2. Errors as above
3.

Actual Results:  
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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Cannot connect to MySQL server on 'localhost'. Please make sure you have 
specified a valid MySQL database name in 'include/config.php'.

Expected Results:  
Cacti login screen with default admin login

Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-
2.3.5-r0, 2.6.11-gentoo-r3 i686)
=================================================================
System uname: 2.6.11-gentoo-r3 i686 Intel(R) Pentium(R) 4 CPU 2.00GHz
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5, 2.4.1-r1
sys-apps/sandbox:    1.2.10
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/shar
e/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/sh
are/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org 
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X acl alsa apache2 apm arts avi berkdb bitmap-fonts crypt cups curl 
eds emboss encode esd fam fastcgi foomaticdb fortran gd gdb gdbm gif gnome gpm 
gstreamer gtk gtk2 imlib innodb ipv6 java jpeg kde libg++ libwww mad mikmod 
motif mp3 mpeg mysql mysqli ncurses nls nocardbus ogg oggvorbis opengl oss pam 
pdflib perl php png python qt quicktime readline samba sasl sdl snmp spell ssl 
svga tcpd tiff truetype truetype-fonts type1-fonts vorbis xml2 xmms xv zlib 
userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-08-08 10:09:30 UTC
(In reply to comment #0)
> After emerge of cacti-0.8.6f-r1, going to the cacti url:
> Cannot connect to MySQL server on 'localhost'. Please make sure you have 
> specified a valid MySQL database name in 'include/config.php'.
> 
> 
> From include/config.php 
>  
> 
> $database_type = "mysql"; 
> $database_default = "cacti"; 
> $database_hostname = "localhost"; 
> $database_username = "cactiuser"; 
> $database_password = "db password here"; 

Uhm, you did not follow the postinstall instructions for upgrading, did you?
Comment 2 Tremaine 2005-08-08 11:37:09 UTC
This was a fresh install, so I didn't use the upgrade instructions.
Comment 3 Lance Albertson (RETIRED) gentoo-dev 2005-08-08 23:35:31 UTC
That doesn't look like you changed the password for the mysql user.
Comment 4 Tremaine 2005-08-09 00:25:07 UTC
(In reply to comment #3)
> That doesn't look like you changed the password for the mysql user.

Yep, I did.  I even logged into the mysql server with the username and password.
 The password noted in the paste from config.php is intentionally broken for the
bug report.

*pasted from above*

From include/config.php 
 

$database_type = "mysql"; 
$database_default = "cacti"; 
$database_hostname = "localhost"; 
$database_username = "cactiuser"; 
$database_password = "db password here"; 
 

I'm able to log into mysql at the command line with cactiuser and the db 
password specified in config.php 

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> 



Comment 5 Lance Albertson (RETIRED) gentoo-dev 2005-08-09 07:36:05 UTC
So your password is 'db password here' ? I'm not sure if you need to escape the
spaces in the config file. I don't think its very wise at all to use that as
your default password. Why in the world would you do that?!
Comment 6 Tremaine 2005-08-09 11:24:14 UTC
The password indicated in the config.php here in the bug report is not the 
password being used on the system where it is failing.

For practical purposes in testing, we can pretend that the password is 
123456.  With a password of 123456 in config.php I get the errors previously 
noted.  I am able to log into mysql with cactiuser and a password of 123456 
and see the cacti db.
Comment 7 Tremaine 2005-08-09 11:34:21 UTC
Odd.

In a fit of pique, I changed the password temporarily to the aforementioned 
123456.  It works.

It would appear that the use of at least some special characters breaks 
authentication - this is likely something that should be fixed to allow for 
strong passwords and perhaps a warning in the meantime that the use of special 
characters is not supported in the current version.
Comment 8 Marco Morales 2005-10-31 23:46:48 UTC
Itsnt really a problem with ebuild or package itself.... using spaces in
password isnt the proper way.
Comment 9 Tremaine 2005-11-05 13:46:10 UTC
(In reply to comment #8)
> Itsnt really a problem with ebuild or package itself.... using spaces in
> password isnt the proper way.

No spaces were used in the password.  As a matter of course, I never post
passwords.  Ever.  the "db password here" was not the password.

It turns out that cacti does not handle the use of the $ char in passwords very
well (at all) and that was the source of the problem.  I've found a few apps
that suffer from this problem, but it's certainly not universal.  The $ should
be an accepted character for passwords to encourage the use of stronger
passwords involving special chars.