Syntax:
PASSWORD(str)

Calculates and returns a hashed password string from the plaintext
password str and returns a nonbinary string in the connection character
set (a binary string before MySQL 5.5.3), or NULL if the argument is
NULL. This function is the SQL interface to the algorithm used by the
server to encrypt MySQL passwords for storage in the mysql.user grant
table.

The password hashing method used by PASSWORD() depends on the value of
the old_passwords system variable:

URL: http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html

