Use asymmetric encryption so that the data is encrypted before being inserted into the database, but you do not store the necessary key to decrypt the data on the server.
This key should only be stored on the client side, so it can decrypt it after retrieving it from your server.
- . MySQL, , MySQL . IP-, , , VPN .
openssl_* PHP.
, / .