List:MySQL on Win32« Previous MessageNext Message »
From:Sayan Chaliha Date:September 5 2009 3:32pm
Subject:Re: mysql encrpy function
View as plain text  
Hi Koray,

You are almost right: The MySQL ENCRYPT function uses the 'crypt' *system
call, *which is basically a function available only on UNIX-like systems and
is not an executable application, i.e., a file. So, you cannot download it
from anywhere. In Windows systems, the ENCRYPT function will always return a
null.

However, you can try and use another function which will perform a similar
operation. There are several available. For instance, you could use the
ENCODE function instead of the ENCRYPT function. For a complete list, see
http://dev.mysql.com/doc/refman/5.0/en/encryption-functions.html#function_encrypt
.

I hope that answers your query.

On Fri, Sep 4, 2009 at 11:56 PM, koray <korayez5@stripped> wrote:

> Hello,
>
> i want to update an encrypted field in a table using the command below;
>
> UPDATE `db`.`users` SET `cryptpassword` = ENCRYPT( '123456' ) WHERE
> `users`.`userid` =3 LIMIT 1 ;
>
> but it returns a NULL value on the field after the command. After some
> googleing i learned that encryption is done by crypt executable file on the
> system. But i dont have this file on the system. Where can i find that file,
> or if'm wrong can you please tell me how can i update an encrypted field on
> the table.
>
> Windows XP, mysql version. 5.0
>
> Regards
>
>
> --
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe:
> http://lists.mysql.com/win32?unsub=1
>
>


-- 
Regards,
Sayan Chaliha
Webyog Softworks Private Limited
2nd Floor, Novel Team Building
#10, 100 Feet Ring Road
BTM Layout 1st Stage
Bangalore - 560068

+91-9743357501

Thread
mysql encrpy functionkoray4 Sep
  • Re: mysql encrpy functionSayan Chaliha5 Sep