Syntax:
PASSWORD(str)

*Note*: This function is deprecated as of MySQL 5.7.6 and will be
removed in a future MySQL release.

Returns a hashed password string calculated from the cleartext password
str. The return value is a nonbinary string in the connection character
set, 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 old_passwords system variable controls the password hashing method
used by the PASSWORD() function. It also influences password hashing
performed by CREATE USER and GRANT statements that specify a password
using an IDENTIFIED BY clause.

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

