Mysql – How to install keyring_aws plugin in MySQL

awsencryptionMySQLmysql-5.7

I am looking for a way to install keyring_aws plugin in mysql community edition.
Is it possible?

I gone through couple of docs,

https://dev.mysql.com/doc/refman/5.7/en/keyring-aws-plugin.html
https://dev.mysql.com/doc/refman/5.7/en/keyring-installation.html

And also tried to findout keyring_aws.so file, but couldn't find it anywhere.

I checked in mysql dir also.

root@server:~# ls -l /usr/lib/mysql/plugin/
total 644
-rw-r--r-- 1 root root  21224 Jan 22 17:26 adt_null.so
-rw-r--r-- 1 root root   6288 Jan 22 17:26 auth_socket.so
-rw-r--r-- 1 root root  44144 Jan 22 17:26 connection_control.so
-rw-r--r-- 1 root root 108696 Jan 22 17:26 innodb_engine.so
-rw-r--r-- 1 root root  88608 Jan 22 17:26 keyring_file.so
-rw-r--r-- 1 root root 154592 Jan 22 17:26 libmemcached.so
-rw-r--r-- 1 root root   9848 Jan 22 17:26 locking_service.so
-rw-r--r-- 1 root root  10840 Jan 22 17:26 mypluglib.so
-rw-r--r-- 1 root root   6288 Jan 22 17:26 mysql_no_login.so
-rw-r--r-- 1 root root  56064 Jan 22 17:26 rewriter.so
-rw-r--r-- 1 root root  56936 Jan 22 17:26 semisync_master.so
-rw-r--r-- 1 root root  14768 Jan 22 17:26 semisync_slave.so
-rw-r--r-- 1 root root  27568 Jan 22 17:26 validate_password.so
-rw-r--r-- 1 root root  31296 Jan 22 17:26 version_token.so

Can we build this .so file from scratch? If yes, where can I find the source?

Best Answer

Unfortunately, the keyring_aws plugin is only available on the Enterprise edition (not available on the community edition).

For community edition, the only encryption method available for tablespace encryption is the standard keyring (keyring_file.so)

To load the plugin, use the --early-plugin-load option to name the plugin library file that contains it. For example, on platforms where the plugin library file suffix is .so, use these lines in the server my.cnf file (adjust the .so suffix for your platform as necessary):

[mysqld]
early-plugin-load=keyring_file.so

If you need the AWS plugin and can't pay for enterprise edition your best option could be MariaDB: https://mariadb.com/kb/en/library/aws-key-management-encryption-plugin/