List:MySQL on Win32« Previous MessageNext Message »
From:Scott Leighton Date:July 21 2004 5:31am
Subject:Re: PASSWORD('qwert')
View as plain text  
On Tuesday 20 July 2004 9:43 pm, DAW.THAZIN-ZAW-WIN@stripped wrote:
> Hello,
> I've created the user table with varchar(8) for password field. And I
> inserted the data for this field as PASSWORD('qwert') for example, it
> showed as 51d140c551.
> When I do SELECT for the logon user and match the 2 passwords, it showed
> the passwords are not matched even though they are the same.
> SELECT id, name, password FROM User;
> id      name    password
> 10      John    51d140c551
> How can I check this ? Is there anyway to see the uncoded password ?


  How are you specifying the password in the where clause? You need
to encode it to match the encoded password in the db...

  select id, name, password from user
where name = 'John' and password = password('qwert');

  Also, it's bad practice to name fields with keyword names.

  Scott


-- 
POPFile, the OpenSource EMail Classifier
http://popfile.sourceforge.net/
Linux 2.6.5-7.95-default x86_64
Thread
PASSWORD('qwert')DAW.THAZIN-ZAW-WIN21 Jul
  • Re: PASSWORD('qwert')Scott Leighton21 Jul