Probably, the easiest way to encrypt MySQL database in Ubuntu is by using ecryptfs-utils. Install ecryptfs-utils:
apt-get install ecryptfs-utils
Mount /usr/local/encrypted directory and create mdf directory for MySQL data files (you will be prompted for passphrase and other options):
mkdir /usr/local/encrypted mount -t ecryptfs /usr/local/encrypted /usr/local/encrypted cd /usr/local/encrypted mkdir mdf chug.sh mysql mdf chmod og-rwx mdf