Name
ENCRYPT( )
Synopsis
ENCRYPT(string
[,seed
])
This function returns encrypted text using
the C function crypt
. A two-character string may
be given in the second argument to increase the randomness of
encryption. Encryption cannot be decrypted in MySQL. You should not
use this function for the password column in the
user table of the mysql
database. Use PASSWORD( )
instead.
UPDATE teachers SET pwd = ENCRYPT('test', 'JT') WHERE teacher_id = '730522';
Get MySQL in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.