LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-23-2003, 06:56 PM   #1
peteABK
Member
 
Registered: May 2003
Location: Canada
Distribution: Fedora 13
Posts: 49

Rep: Reputation: 15
mysql's password()


Hello,

has anyone run accross problems with the password() function in mysql? I have a user table in a separate database from the mysql one, but any time I try to compare passwords it screws up.

I can run console and web queries like:

select pword from login where u_id=<value>;

and it returns one hashed password. good.
but

select * from login where u_id=<"value"> AND password('<password>');

OR

select * from login where u_id=<"value"> AND pword=password('<password>');

returns an empty sets. Shouldn't I get atleast one row back? (using correct u_id and pword)

also selecting a user name by the password returns all user names, is that just mysql security?
 
Old 10-23-2003, 08:49 PM   #2
martinman
Member
 
Registered: Apr 2003
Distribution: Gentoo 1.4
Posts: 290

Rep: Reputation: 30
lol, you dont need the < and >'s they just indicate a variable in an example, so :

select * from login where u_id="value" AND pword=PASSWORD('password');

should do it
 
Old 10-23-2003, 11:48 PM   #3
peteABK
Member
 
Registered: May 2003
Location: Canada
Distribution: Fedora 13
Posts: 49

Original Poster
Rep: Reputation: 15
Thanks.

I was putting them in there instead of actual values.
 
Old 10-23-2003, 11:57 PM   #4
peteABK
Member
 
Registered: May 2003
Location: Canada
Distribution: Fedora 13
Posts: 49

Original Poster
Rep: Reputation: 15
But really can anyone help?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Change name of mysql's binary logs Ratclaws Linux - Software 0 09-07-2005 01:53 PM
How can I change e-mail password(or linux account password) with php in website?? yusuf Programming 1 05-28-2004 09:39 AM
forgot my password ? i can change the password JrLz Linux - Security 9 04-06-2004 07:36 PM
using mysql's C API, but lost with libs chr15t0 Programming 3 11-22-2003 09:01 AM
Just change Samba password, not Unix password? sorrodos Linux - Networking 1 08-14-2003 07:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration