title: How to encrypt data before insert/update and decrypt before select from mysql table?
body: <p>I have 80 tables in a MySQL DB and I want to encrypt data of these table so that no one can access data directly.</p>
  
  <p>1) The no. of queries in my project is too high so I can't use AES_ENCRYPT(column_name, key) for encryption and AES_DECRYPT(column_name, key) for decryption of data in each query.</p>
  
  <p>2) I can use Data Encryption at Rest but it only encrypts db files (*.ibd ). However, data is still in normal form and any user can see the real data from any workbench (MySQL Workbench, Sqlyog or command line).</p>
  
  <p>Is there any other way by which I can encrypt and decrypt MySQL data? Or any other db that provides functionality to store data in an encrypted form?</p>
  
  <p>I am using MySQL version 5.7.23</p>