I have 1 server running 1 installation of MariaDB

In that installation of MariaDB, I have a CustomerService database and WorkFlow database.

Can I encrypt CustomerService with one key and WorkFlow with another key so that users accessing WorkFlow cannot see CustomerService or vice/versa?

Or do I need another installation of MariaDB?

  • You can use normal GRANT access control to restrict access of users to a single database. – danblack Feb 28 at 22:21
  • Thanks for the reply @danblack... but I'm asking about encryption rather than rights. Is there a way to use different keys for different databases? Thanks! – MGoBlue93 Feb 28 at 23:04
  • There is no separation with encryption. Are you giving users access to the raw MariaDB files? I'm having trouble thinking of a risk scenario where a different key per database will help. Binary logs and innodb redo/undo logs are always shared across databases anyway. – danblack Feb 28 at 23:10
  • No, I don't want to give access to the raw files. I'm asking if I have 2 databases in 1 server can I use two different encryption keys. One key for DB number one and a different key for DB number two. Don't think of if in terms of your risk scenario(s) or how you would build something please. The question is can separate keys be used. Thanks! – MGoBlue93 Mar 1 at 17:50

In the documentation it says each table can have a manually specified encryption key number.

ALTER TABLE my_db.my_encrypted_table

If each database1 has all its tables having a different encryption key number from database2 tables' then they are using different keys.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.