After emerge mysql (3.23.56) and running the config option of the ebuild, and starting the daemon, the directions inform the installer to set a root password: mysqladmin -u root password 'new-password' This will result in the error: mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user: 'root@localhost' (Using password: NO)' An old note in the mail archives recommends using the local net name of the machine, but that doesn't work either. mysqladmin -u root -h darkstar password 'new-password' results in the same error. The phpnyadmin utility will not work as shipped because of this bug as it expects to connect to the mysqld as "root". Reproducible: Always Steps to Reproduce: 1. emerge mysql 2. ebuild /var/lib/pkg/dev-db/mysql-3.23.56/mysql-3.23.56.ebuild config 3. rc-update add mysql default 4. /etc/init.d/mysql start 5. mysqladmin -u root password some_password Actual Results: mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user: 'root@localhost' (Using password: NO)' Expected Results: It should have accepted the new password Portage 2.0.47-r10 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r4) ================================================================= System uname: 2.4.20 i686 Celeron (Coppermine) GENTOO_MIRRORS="http://gentoo.oregonstate.edu/ http://distro.ibiblio.org/pub/Linux/distributions/gentoo" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /var/bind /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR_OVERLAY="" USE="x86 oss 3dnow apm avi crypt encode gif jpeg kde libg++ mikmod mmx motif mpeg ncurses pdflib png quicktime spell truetype xml2 xmms xv zlib gdbm berkdb slang readline arts svga java postgres sdl gpm tcpd pam libwww ssl python esd imlib oggvorbis qt opengl X gtk gnome -alsa jikes usb cups tcltk perl mysql odbc -nls"COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-O2 -mcpu=i686 -pipe" CXXFLAGS="-O2 -mcpu=i686 -pipe" ACCEPT_KEYWORDS="x86" MAKEOPTS="-j2" AUTOCLEAN="yes" SYNC="rsync://rsync.gentoo.org/gentoo-portage"
It works here for me, with one minor change. 1. ebuild /var/db/pkg/dev-db/mysql*/*.ebuild config 2. mysqladmin -u root -h darkstar password 'new-password' then the next instruction says: mysqladmin -u root -h darkstar password 'new-password' but I found I had to: mysqladmin -u root -h darkstar -p password 'new-password' and when prompted, enter the new-password from instruction 2. One other thing for you to check, is if you have a pre-existing MySQL database in /var/lib/mysql. In that case, the config does NOT overwrite it, and the old password is still in place.
waiting for a response to close this issue.
That took care of it. Thank you.
This seems to be an upstream glitch. Pending reporting to MySQL.
the commands supplied here work so far as i am able to connect to the server afterwards, but they do not actually set a password - i am able to connect as root with an empty password and no password shows up in the mysql.user table... there is a thread in the forums about this: http://forums.gentoo.org/viewtopic.php?p=375006#375006
slartibartfasz: run 'flush privileges;' in the mysql console after you use 'set password'.
> run 'flush privileges;' a classic - sorry! as far as i can see in the forums it seems to work now for everyone :))
user reports fixed.