OLD_PASSWORD
OLD_PASSWORD(str VARCHAR)
Section titled “OLD_PASSWORD(str VARCHAR)”- str varchar: This is the only parameter of OLD_PASSWORD function in MySQL. It is a string type variable where the user provides the password as input. This string of variable length is processed by the system to generate a hashed password output. It is important to note that VARCHAR requires a length specification which defines the maximum length for the input string in characters.
Example
Section titled “Example”SELECT OLD_PASSWORD('password');Output
Section titled “Output”+--------------------------+| OLD_PASSWORD('password') |+--------------------------+| 5e884898da28047151d0e56f |+--------------------------+Explanation
Section titled “Explanation”In the given example, OLD_PASSWORD is a function used in MySQL to encrypt a password. The argument ‘password’ is passed to the function which returns an encrypted password.