MySQL MySQL和数据文件加密
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/143750/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
MySQL and data file encryption
提问by Miguel Ping
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.
有没有办法加密mysql使用的数据文件?我在一台开放的机器上有一个 mysql 服务器,我想加密数据文件,这样即使有人复制了数据文件,他们也无法读取数据。
Thanks
谢谢
采纳答案by dimus
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.
你看过Truecrypt吗?它适用于大多数流行的操作系统,并允许创建虚拟加密分区、锁定硬盘分区、外部驱动器或 USB 设备。
回答by Trae
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/
对于任何研究Linux透明 MySQL 加密解决方案的人来说,我们一直在使用一个相对较新的产品:http: //www.gazzang.com/
I am not affiliated with Gazzang... just a happy customer.
我不隶属于 Gazzang ……只是一个快乐的客户。
回答by Kev
MySQL doesn't support data file encryption natively. There are 3rd products out there such as:
MySQL 本身不支持数据文件加密。有 3rd 产品,例如:
http://www.vormetric.com/products/vormetric_database_encryption_expert.html
http://www.vormetric.com/products/vormetric_database_encryption_expert.html
There's a 'white paper' on the topic here:
这里有一份关于该主题的“白皮书”:
http://www.vormetric.com/documents/FINALPart2DatabaseEncryptionCoreGuardvsColumnLevelWhitePaper7.pdf
http://www.vormetric.com/documents/FINALPart2DatabaseEncryptionCoreGuardvsColumnLevelWhitePaper7.pdf
To be honest, if the database content has any commercial value or contains personal data about individuals, you should really control who has access to the datafiles (whether encrypted or not). In the UK, leaving such data files open to casual passers-by, would be a data protection no no.
老实说,如果数据库内容具有任何商业价值或包含有关个人的个人数据,您应该真正控制谁可以访问数据文件(无论是否加密)。在英国,将此类数据文件向随便的路人开放,将是数据保护的禁忌。
回答by Khamyl
If you are using windows EFS and starting MySQL as a service, you will need to do the following:
如果您使用 Windows EFS 并将 MySQL 作为服务启动,则需要执行以下操作:
- go to Services and find the MySQL service
- stop the service
- right-click -> properties -> LogON TAB
- check "This account"
- fill your windows account name eg. ".\username"
- provide your password
- start the service
- 转到服务并找到 MySQL 服务
- 停止服务
- 右键单击 -> 属性 -> 登录选项卡
- 勾选“此账户”
- 填写您的 Windows 帐户名称,例如。“。\用户名”
- 提供您的密码
- 启动服务
The MySQL service should now start without errors.
MySQL 服务现在应该可以正常启动。
To use the windows EFS encryption:
要使用 Windows EFS 加密:
http://windows.microsoft.com/en-us/windows/encrypt-decrypt-folder-file#1TC=windows-7
http://windows.microsoft.com/en-us/windows/encrypt-decrypt-folder-file#1TC=windows-7
Read more obout it:
阅读更多关于它:
http://www.petri.co.il/how_does_efs_work.htm#
http://www.petri.co.il/how_does_efs_work.htm#
!!! Don't forget to export the certificate !!!
!!!别忘了导出证书!!!
回答by Vinko Vrsalovic
回答by J.J.
you could encrypt the data within mysql using the built in encryption functionality.
您可以使用内置的加密功能对 mysql 中的数据进行加密。
as for the files, any file solution should work fine.
至于文件,任何文件解决方案都应该可以正常工作。