Bug 124772 - cannot connect to db server after setting passwd
Summary: cannot connect to db server after setting passwd
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: mysql   
(Show other bugs)
Version: 2
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Tom Lane
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-05-29 20:44 UTC by Mark Frazer
Modified: 2013-07-03 03:01 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-06 17:53:32 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Mark Frazer 2004-05-29 20:44:42 UTC
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:

Comment 1 Flavio Cardone 2004-06-22 07:48:52 UTC
Bug also happens to me - exactly as described

Comment 2 Mark Frazer 2004-06-22 12:51:11 UTC
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]# 

Comment 3 Tom Lane 2004-10-06 17:53:32 UTC
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.

Comment 4 Mark Frazer 2004-10-06 18:04:59 UTC
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.

Comment 5 Mark Frazer 2004-10-06 18:10:20 UTC
Ah, the bugzilla docs are fine.  Who knows where I decided this was
the proper syntax...  <sigh>

Sorry for the misfire.


Note You need to log in before you can comment on or make changes to this bug.