From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020827 Description of problem: Start with a fresh fedora core 2 install. $ mysql -u root mysql mysql> update user set password='foo' where user='root'; Query OK, 2 rows affected (0.01 sec) Rows matched: 2 Changed: 2 Warnings: 0 mysql> flush privileges; Query OK, 0 rows affected (0.01 sec) mysql> quit Bye [root@bits root]# mysql -u root -p mysql Enter password: ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES) where the password entered was foo I do not have this problem on Fedora Core 1. $ Version-Release number of selected component (if applicable): mysql-server-3.23.58-9 How reproducible: Always Steps to Reproduce: see description Expected Results: The root mysql user should have logged into the database Additional info:
Bug also happens to me - exactly as described
I ended up just getting the latest mysql rpm's from mysql. They installed fine over FC2 [root@bits root]# rpm -qa | grep -i mysql MySQL-devel-4.0.20-0 MySQL-shared-4.0.20-0 php-mysql-4.3.6-5 MySQL-server-4.0.20-0 perl-DBD-MySQL-2.9003-4 MySQL-client-4.0.20-0 [root@bits root]#
AFAICS this is not a bug, but pilot error. The MySQL documentation says that if you want to set the password via a direct UPDATE, you should do it like this: UPDATE user SET Password=PASSWORD('new_password') WHERE user='root'; FLUSH PRIVILEGES; and when I do it like that it works fine. I presume the PASSWORD() function is needed to munge the password into encrypted form.
Ok, I guess that the mysql used in FC1 and MySQL 4 RPMS from mysql.org have a different password interface the the FC2 mysql rpms. I will offer this as a footnote to the bugzilla documentation.
Ah, the bugzilla docs are fine. Who knows where I decided this was the proper syntax... <sigh> Sorry for the misfire.