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
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