Syntax:
PASSWORD(str)

*Note*:

This function is deprecated in MySQL 5.7 and is removed in MySQL 8.0.

Returns a hashed password string calculated from the cleartext password
str. The return value is a 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: https://dev.mysql.com/doc/refman/5.7/en/encryption-functions.html

