Kevin,
Kevin Lee wrote:
Hello,
In 4.1.0 alpha, I found the result of "SELECT PASSWORD('WHATEVER')" statement
is generating random results. Therefore I had to use MD5() to store password to
my
tables.
Results are not random. This is SHA1 based algorithm which produces these
hashes.
4.1 uses different, more secure password encryption and authentication
mechanism.
It implements function OLD_PASSWORD() which uses old code for compatibility.
However you must note that PASSWORD() function was always intended to be used
for
storing MySQL users passwords only and never for using in any other area.
Quoting manual:
Note: The PASSWORD() function is used by the authentication system in MySQL
Server, you should NOT use it in your own applications. For that purpose, use
MD5() or SHA1() instead. Also see RFC-2195 for more information about handling
passwords and authentication securely in your application.
Best regards