Jump to: navigation, search

Mysql OLD PASSWORD

From w3cyberlearnings

Contents

MySQL OLD_PASSWORD Function

This function returns the value of the pre-4.1 implementation of PASSWORD() as a string. And, thus this function permit password reset for any pre-4.1 clients that need to connect to MySQL 5.5 server without locking the connection.

Syntax OLD_PASSWORD

  • str: string to encrypt
OLD_PASSWORD(str);

Note

MySQL v5.5.3, this function return value is a nonbinary string in the connection character set.

Example 1

mysql> SELECT OLD_PASSWORD('good');
+----------------------+
| OLD_PASSWORD('good') |
+----------------------+
| 552151cf55e12624     | 
+----------------------+
1 row in set (0.00 sec)


Example 2

mysql> SELECT OLD_PASSWORD('good'),PASSWORD('good');
+----------------------+-------------------------------------------+
| OLD_PASSWORD('good') | PASSWORD('good')                          |
+----------------------+-------------------------------------------+
| 552151cf55e12624     | *8409037B3E362D6DAE24C8E667F4D3B66716144E | 
+----------------------+-------------------------------------------+
1 row in set (0.00 sec)


Related Links


Navigation
Web
SQL
MISC
References