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
(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?
This was a fresh install, so I didn't use the upgrade instructions.
That doesn't look like you changed the password for the mysql user.
(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>
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?!
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.
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.
Itsnt really a problem with ebuild or package itself.... using spaces in password isnt the proper way.
(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.