You are viewing an old version of this article. View the current version here.

Syntax:

 
PASSWORD(str)

Description:

Calculates and returns a password string from the plaintext password str and returns a binary string, or NULL if the argument was NULL. This is the function that is used for encrypting MySQL passwords for storage in the Password column of the user grant table.

Examples:

MariaDB [(none)]> SELECT PASSWORD('notagoodpwd');
+-------------------------------------------+
| PASSWORD('notagoodpwd')                   |
+-------------------------------------------+
| *3A70EE9FC6594F88CE9E959CD51C5A1C002DC937 |
+-------------------------------------------+
1 row in set (0.00 sec)

MariaDB [(none)]> 

Comments

Comments loading...