This tutorial explains how to use the MySQL OLD_PASSWORD function with syntax and examples.
Description
The MySQL OLD_PASSWORD function is used by the authentication system to generate a hashed password from a plaintext password string, using hashing techniques prior to MySQL 4.1. To use newer hashing techniques, use the PASSWORD function.
Syntax
The syntax for the OLD_PASSWORD function in MySQL is:
Parameters or Arguments
string
A plaintext password string that is the source to create an encrypted/hashed password in MySQL, using hashing techniques prior to MySQL 4.1.
Note
The OLD_PASSWORD function will return NULL, if the string is NULL.
The OLD_PASSWORD function was added in MySQL 4.1 when the password hashing techniques changed with the introduction of the PASSWORD function in MySQL 4.1.
The OLD_PASSWORD function is used by the authentication system in MySQL to store passwords.
Do not use th OLD_PASSWORD function in your own application, use the MD5 or SHA1 functions instead.