I have mysql 5.1 installed by macports with it's data dir in the default location, which is outside my user directory that's protected by filevault.

I'd like to store the data in an encrypted state by either somehow moving it into the filevault or using some alternate encryption method.

Can you suggest a way to to do either one of these?

Many thanks

link|improve this question

49% accept rate
1  
Do you start and stop MySQL yourself, or does it always run? – Daniel Beck Jan 4 '11 at 8:29
it always runs. – GJ. Jan 4 '11 at 13:23
In that case, you lose. Think about it: Your system would need to access the MySQL data before you can even log in. Any encryption's pass phrase would have to be stored somewhere in startup scripts. – Daniel Beck Jan 4 '11 at 13:49
How does MySQL start? Does it use the org.macports.mysql5.plist provided by MacPorts? – lewist Jan 12 '11 at 22:44
@Tait: yes. (launchd) – GJ. Jan 14 '11 at 21:45
feedback

4 Answers

If you'd like it to be used in the same manner as FileVault (unencrypted on login, encrypted automatically on logout), just move the data to somewhere in your user homedirectory, get your permissions set up right, and then symlink to the data from the default location.

If you just want to make an encrypted archive, you could do that with an encrypted DMG from Disk Utility.

link|improve this answer
1  
The user didn't understand your second option, maybe you could elaborate what it means. – Daniel Beck Jan 4 '11 at 11:20
feedback

If your running Linux try ezNcrypt from Gazzang It's a complete transparent data encryption solution for MySQL with very low if any performance cost. http://gazzang.com

link|improve this answer
well... it's OS X – GJ. Jan 14 '11 at 21:46
feedback

If you just want fields encrypted you could do something like this: http://articles.techrepublic.com.com/5100-10878_11-6124013.html

The article describes using the encode or encrypt method for field contents.

Truecrypt would let you move it into a encrypted virtual partition...

link|improve this answer
feedback

You may want to try TrueCrypt (which you can get here). Basically, TrueCrypt creates files which are encrypted file system containers. TrueCrypt allows you to mount these files as another filesystem, and all data moved/copied to this "drive" is encrypted on-the-fly.

When you wish to encrypt the contents so nobody can read them, just dismount the TrueCrypt volume.

link|improve this answer
Surprisingly permissive, world readable: the TrueCrypt virtual device (the attached volume) is not encrypted, and by default TrueCrypt permits all other users of Mac OS X — including the Guest Account, if enabled — to access your unencrypted content for as long as the device is attached. Consider using a file system (not the TrueCrypt default FAT) that will allow you to both (a) change the privilege for everyone from read only to no access; and (b) remove or change the read and write privilege that is granted to the primary group. – Graham Perrin Aug 7 '11 at 21:34
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.