Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8141379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:29:15+00:00 2026-06-06T12:29:15+00:00

I encrypted my password field and inserted it into a MySQL table. After that

  • 0

I encrypted my password field and inserted it into a MySQL table.
After that I decrypted that column by

select fld_user,fld_pwd,AES_DECRYPT(fld_encryptedpwd,'key')
  from users 
 where fld_id='1903';

But, the result is showing “BLOB”. I used Varbinary() as the datatype for encrypted column. What I should do ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T12:29:17+00:00Added an answer on June 6, 2026 at 12:29 pm

    Solution for in MySQL Workbench is to toggle the following option for the SQL Editor: “Treat BINARY/VARBINARY as nonbinary character string.” At least on MacOS X, you’ll need to restart Workbench for the option to take effect. (You can also right click the value and do ‘Open Value in Viewer’).

    If you don’t want to change the options in Workbench, you can use the CAST() function to return the result of AES_DECRYPT() as a string:

    SELECT fld_user, fld_pwd, CAST(AES_DECRYPT(fld_encryptedpwd, 'key') AS CHAR)
    FROM users WHERE fld_id='1903';
    

    A trick to check/make sure what data type a function would return is to do the following using the MySQL CLI:

    mysql> CREATE TALBE tmp1 AS SELECT AES_DECRYPT(fld_encryptedpwd, 'key')
           FROM users WHERE fld_id='1903';
    mysql> DESC tmp1;
    

    That will show which data type will be returned.

    (Again, storing encrypted passwords: not so good.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have table in my database that have senestive data such as password field
The password field in my user table (SQL Server 2008) is encrypted using HASHBYTES
I have a field (regular field, not a password) that is being stored in
I know that the password field in /etc/shadow is prefixed with ${number}$ if it
I was sending an encrypted password (in md5) to a sql database. Accidentally, i
I am trying to understand how encrypted (password protected) Office 2007 documents are bundled
How can I decrypt a password string in PHP which was encrypted with crypt
I am using require 'digest/sha1' to encrypt my password and save into database. During
I have a user auth table with a few thousand records containing a password
I have a custom log in that returns an encrypted Token, which indicates that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.