Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL and data file encryption

Is there a way to encrypt the data file that mysql uses? I have a mysql server on an open machine, and I would like to encrypt the data file so even if someone copies the data files, they cannot read the data.

Thanks

like image 222
Miguel Ping Avatar asked Sep 27 '08 14:09

Miguel Ping


People also ask

Is MySQL database files encrypted?

The mysql system tablespace contains the mysql system database and MySQL data dictionary tables. It is unencrypted by default. To enable encryption for the mysql system tablespace, specify the tablespace name and the ENCRYPTION option in an ALTER TABLESPACE statement.

Does MySQL have TDE?

MySQL Server supports Transparent Data Encryption (TDE), which protects critical data by enabling data-at-rest encryption.

How do I encrypt an existing MySQL database?

To enable encryption for an existing file-per-table tablespace, specify the ENCRYPTION option in an ALTER TABLE statement. mysql> ALTER TABLE t1 ENCRYPTION='Y'; To disable encryption for file-per-table tablespace, set ENCRYPTION='N' using ALTER TABLE .


2 Answers

To anyone researching a transparent MySQL encryption solution for Linux, there's a relatively new product on the block that we've been working with: http://www.gazzang.com/

I am not affiliated with Gazzang... just a happy customer.

like image 141
Trae Avatar answered Nov 15 '22 14:11

Trae


I am not sure what do you mean when you say that your machine is open. If people have access to the console, or to your account it is much harder of a task to encrypt the file.

Did you look at Truecrypt? It works for most popular operating systems and allows to create a virtual encrypted partition, lock down a hard drive partition,an external drive or a usb device.

like image 28
dimus Avatar answered Nov 15 '22 14:11

dimus