Is there any way (native MySQL functions or SQL syntax) to encrypt the columns 开发者_运维技巧of a table in MySQL database?
MySQL has a wide range of built-in encryption functions, you can find a detailled overview here: http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html
You might want to have a look at e.g. AES_DECRYPT() and AES_ENCRYPT().
INSERT INTO table (mycolumn) VALUES(AES_ENCRYPT('Hello!', 'encryption_key'));
SELECT AES_DECRYPT(mycolumn, 'encryption_key') FROM table;
For encryption functions you can look at: encryption-functions
精彩评论