top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How can we encrypt and decrypt a data present in a MySQL table using MySQL?

+2 votes
527 views
How can we encrypt and decrypt a data present in a MySQL table using MySQL?
posted Oct 1, 2014 by Vrije Mani Upadhyay

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Use AES_ENCRYPT (),AES_DECRYPT() functions in mysql for encryption and decryption.

example:

insert into landb.login (id, username, password )values(123, '12',AES_ENCRYPT ('nidhinek','nixpass'))

select AES_DECRYPT(landb.login.password, 'nixpass') from login where id=123

Output:nidhinek

answer Oct 5, 2014 by Devyani
Similar Questions
+1 vote

In my web application I have a requirement database password should be stored in properties fie and that should be encrypted and during login that it needs to check the username password and database password database password should be decrypt during login and and encrypt during log out.

0 votes

How can I insert data into one table from two other tables where i have three tables namely users, role and userrole.
Now I want to insert the data into userrole table from users table and role table with a single statement.

+1 vote

I have some problem
I have store the data in the database without encrypt but i am view the data encrypt method after 1 day and doesn't know the details.

I am using php and mysql, Could the experts please comment on this, and offer some advice?

...