Okay, so you’ve read the first post on enabling MariaDB’s data at rest
encryption, and now you are ready to create an encrypted table.
And just to get it out of the way for those interested, you can
always check your encrypted (and non-encrypted) table stats via:
SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION;
ENCRYPTION_SCHEME=1 means the table is encrypted and
ENCRYPTION_SCHEME=0 means they are not.
But let’s get into some specific examples.
I find the following 4 tables interesting, as the first 3
essentially all create the same table, and the 4th shows how to
create a non-encrypted table once you have encryption enabled.
CREATE TABLE t10 (id int) ENGINE=INNODB;
CREATE TABLE t11 (id int) ENGINE=INNODB ENCRYPTED=YES;
CREATE TABLE t12 (id int) ENGINE=INNODB …
[Read more]