[TriLUG] Apache & MySQL

Jeremy Portzer jeremyp at pobox.com
Wed Nov 19 09:41:49 EST 2003


On Tue, 2003-11-18 at 07:29, Stephen Hoffman wrote:

> INSERT into users (userName, password) VALUES ('steve', ENCRYPT('password'))
> 
> It apears that the username is matching correctly in the table, if I put a
> username not in the table then I get this error:
>  MySQL user test not found: /admin/
> any username in the table gets password mismatch, are there other types of
> encryption that apache expects MySQL to be using?
> 

I'm pretty sure the function for password encryption is
PASSWORD('plaintextpw') -- at least that's what I always use and it
seems to work for me.  ENCRYPT() does something different.  If you check
the MySQL documentation, you'll see they always use the PASSWORD()
function too.

Also, there are mysqladmin commands and GRANT statements that allow you
do to this kind of stuff without raw SQL.  That is preferred, because
that way you don't need to worry about which function to use; it's taken
care of.

--Jeremy

-- 
/---------------------------------------------------------------------\
| Jeremy Portzer        jeremyp at pobox.com      trilug.org/~jeremy     |
| GPG Fingerprint: 712D 77C7 AB2D 2130 989F  E135 6F9F F7BC CC1A 7B92 |
\---------------------------------------------------------------------/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.trilug.org/pipermail/trilug/attachments/20031119/e0ecb7aa/attachment.pgp>


More information about the TriLUG mailing list