MySQL Forums
Forum List  »  Security

encrypt table
Posted by: Rob Purdy
Date: March 03, 2016 09:06AM

I have a mysql db that we are using for a small project. it will NOT be used by a website. what is the best way as of March 2016 to encrypt the data? I saw the AES function and an example and that looks simple enough. Is that the most secure way currently?

or is there a way to encrypt the entire table or database with a master key password?

i saw something in the documentation about INNODB but i wasn't sure what that was so i thought i'd consult you, the experts at MYSQL.

CREATE TABLE test1_user
( id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY (id),
first_name VARBINARY(100) NULL,
address VARBINARY(200) NOT NULL
)

password = usa2010
INSERT into test1_user (first_name, address)
VALUES (AES_ENCRYPT('Obama', 'usa2010'),AES_ENCRYPT('White House', 'usa2010'));

SELECT cast(AES_DECRYPT(first_name, 'usa2010') as char(100)),
cast(AES_DECRYPT(address, 'usa2010') as char(100))
from test1_user

Options: ReplyQuote


Subject
Views
Written By
Posted
encrypt table
5161
March 03, 2016 09:06AM
1801
March 03, 2016 09:20AM
1681
March 07, 2016 08:45AM
1323
March 07, 2016 09:25AM
1263
May 25, 2016 08:47AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.