According to the Manual:
AES_ENCRYPT() encrypts a string and returns a binary string.
AES_DECRYPT() decrypts the encrypted string and returns the original string.
- MySQL 5.1 Doc: AES_ENCRYPT() / AES_DECRYPT()
I don’t know why it is still returning a binary string in your case. Anyway, try this:
SELECT *,
CAST(AES_DECRYPT(first_name, 'usa2010') AS CHAR(50)) first_name_decrypt
FROM user
And use first_name_decrypt
instead of first_name
.