After upgrade mysql to 5.1.44 anyone can login into root account without password from console. PhpMyAdmin: #1045 - Access denied for user 'root'@'localhost' (using password: YES) Reproducible: Always Steps to Reproduce: 1. upgrade mysql to 5.1.44 Actual Results: milosz@oxygen ~ $ mysql -u root -p Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) milosz@oxygen ~ $ mysql -u root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 Server version: 5.1.44-log Gentoo Linux mysql-5.1.44 Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
I can't reproduce here. speedracer ~ # mysql -uroot ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) Are you sure your configuration was secure before the upgrade? The instructions at the end of the package note to run "emerge --config dev-db/mysql", and explicitly require that you set a password.
I have done: 1. emerge =dev-db/mysql-5.1.44 2. emerge --config =dev-db/mysql-5.1.44 3. I set the password Next: oxygen ~ # emerge --config =dev-db/mysql-5.1.44 Configuring pkg... * Creating the mysql database and setting proper * permissions on it ... * Insert a password for the mysql 'root' user * Avoid ["'\_%] characters in the password > * Retype the password > .100227 0:45:47 [Warning] The syntax '--default-character-set' is deprecated and will be removed in a future release. Please use --character-set-server instead. 100227 0:45:47 [Warning] The syntax '--skip-locking' is deprecated and will be removed in a future release. Please use --skip-external-locking instead. 100227 0:45:47 [Warning] //usr/sbin/mysqld: Option '--set-variable' is deprecated. Use --variable-name=value instead. ....ERROR 2002 (HY000): Can't connect to local MySQL server through socket '//var/run/mysqld/mysqld12373.sock' (2) * Loading "zoneinfo", this step may require a few seconds ... ERROR 2002 (HY000): Can't connect to local MySQL server through socket '//var/run/mysqld/mysqld12373.sock' (2) /tmp/portage/portage/dev-db/mysql-5.1.44/temp/environment: line 3710: //var/run/mysqld/mysqld11286.pid: Nie ma takiego pliku ani katalogu kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] * Stopping the server ... * Done oxygen ~ # /etc/init.d/mysql start * Starting ... * Starting (/etc/mysql/my.cnf) [ ok ] oxygen ~ # oxygen ~ # mysql -u root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.1.44-log Gentoo Linux mysql-5.1.44 Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
Just to add my 2 pence, this error is in the mysqlerr log file after running emerge --config dev-db/mysql: [ERROR] /usr/sbin/mysqld: unknown option '--skip-ndbcluster' [ERROR] Aborting If I forcefully remove this option (line 1096 in mysql.eclass), it stops again with yet another error: [ERROR] /usr/sbin/mysqld: unknown option '--skip-bdb' [ERROR] Aborting Once I have removed this option too (line 1116 in mysql.eclass), the process appears to complete correctly. I have these USE flags set on my build: community perl ssl -big-tables -cluster -debug -embedded -extraengine -latin1 -max-idx-128 -minimal -pbxt -profiling (-selinux) -static -test
I can confirm Russel Knighton's observation: with mysql-5.1, "emerge --config dev-db/mysql" does not work because mysqld dies with --skip-ndbcluster and --skip-bdb options; as a result, you have to set the root password, timezones and help tables by hand.
eclass fixed in CVS now.