I managed to encrypt a password using AES\_ENCRYPT.

```
SELECT
acc.id,
acc.user_id,
acc.type,
acc.account,
acc.`password`,
acc.`status`
FROM
acc

```

Returns this:

```
id      user_id   type          account         password                   status    
16      4         Main          xjdkdndn        xU+WHHT9Eidt8J+xoNMbKw==   0    

```

The password is obviously encrypted. I'm trying to decrypt it using this:

```
SELECT AES_DECRYPT(password,'fawefwefwaef4waegdf235twe4rsgrdtgw54ershtfg')
FROM acc;

```

`fawefwefwaef4waegdf235twe4rsgrdtgw54ershtfg` is the encryption key.

However it always returns a null value.

What am I doing wrong?

Forgot to add, tha password is fkdkfjkddk

EDIT:

Guys I upgraded my mysql to the 5.6 version, and now this is what is being returned:

![Screenshot](https://i.stack.imgur.com/6KLmm.jpg)

That looks like something that could be aes encoded, but then I use AES\_DECRYPT, it still returns a NULL value.

Any guesses?