Metabase showing weird results when using MySQL AES_DECRYPT

If I run the following query in my MySQL DB management app or directly on the database through SSH, I get the correct result of 122379. But when I run it in metabase, I get 0x31323233.

SELECT AES_DECRYPT(UNHEX(<encrypted>, <encryption_key>)) FROM users;

Screen Shot 2022-09-29 at 12.06.26 PM

I'm using a 256-bit encryption key. Any idea what I can do to get this working properly?

Hi @ashishduh
It's a blob type, so you need to convert it - example CONVERT(`blob_column` USING utf8)

Thanks that worked! So metabase automatically detects this as a blob type because it's a computed column I guess?

@ashishduh Metabase receives a blob from the database. Metabase does not support automatic un-blobbing, which is likely supported in your other clients.
https://github.com/metabase/metabase/issues/9649 - upvote by clicking :+1: on the first post