MySQL Data-at-Rest Encryption with Keyring Plugin
By Tom Nonmacher
In today's digital age, data security is of utmost importance. Encrypting data-at-rest is a crucial security practice that involves encoding data when it's stored on disk, which is especially important for databases like MySQL. In MySQL, data-at-rest encryption can be achieved using the Keyring plugin. This blog post will guide you through setting up data-at-rest encryption in MySQL using the Keyring plugin with a focus on technologies like SQL Server 2022, Azure SQL, Microsoft Fabric, Delta Lake, OpenAI + SQL, and Databricks.
MySQL's Keyring plugin provides simple and effective data-at-rest encryption by storing encryption keys securely and separately from the data. The Keyring plugin encrypts the InnoDB tablespace, effectively securing all your data. To enable this plugin, you first need to load it using the INSTALL PLUGIN statement, followed by a server restart. If you're using Azure SQL, make sure that the Azure Key Vault is set up correctly to store the keys.
INSTALL PLUGIN keyring_file SONAME 'keyring_file.so';
-- After this, you should restart the server.
After enabling the plugin, you can create an encrypted table by specifying the ENCRYPTION='Y' option in the CREATE TABLE or ALTER TABLE statement. Here is an example:
CREATE TABLE t1 (c1 INT) ENCRYPTION='Y';
SQL Server 2022 also provides support for data-at-rest encryption with Always Encrypted with secure enclaves. This feature allows client applications to run T-SQL queries on encrypted data, with the SQL Server doing the decryption in a secure enclave inside the server. This ensures that sensitive data never appears in plaintext in the DBMS system. Here is how to set up Always Encrypted with secure enclaves:
-- Enable Always Encrypted with secure enclaves
ALTER DATABASE Database1
SET ENCRYPTION FOR ALL WITH (ENCRYPTION_TYPE = RANDOMIZED, ALGORITHM = 'AEAD_AES_256_CBC_HMAC_SHA_256', COLUMN_ENCRYPTION_KEY = MyCEK, ENCLAVE_TYPE = HGS, ENCLAVE_COMPUTATIONAL = ON);
When it comes to data lakes, Delta Lake allows for encryption at rest of the Parquet files that store the data. This is achieved using the Apache Hadoop Key Provider API, which allows keys to be stored in a variety of backends. Additionally, OpenAI and SQL can be used together to perform AI operations on encrypted data, providing another layer of security.
Lastly, Databricks provides a unified analytics platform that allows you to manage and secure your data effectively. It supports Azure Key Vault-backed secret scopes, which you can use to store keys for data-at-rest encryption.
In conclusion, data-at-rest encryption is a crucial aspect of data security. MySQL's Keyring plugin, SQL Server 2022's Always Encrypted with secure enclaves, Delta Lake's encryption capabilities, and Databricks' support for Azure Key Vault make it easier than ever to secure your data. By leveraging these technologies, you can ensure that your data remains secure, even when at rest.
Check out the latest articles from all our sites:
- How to Take Advantage of Flash Sales at Grocery Stores [https://www.ethrift.net]
- A brief history of the Galveston Hurricane of 1900 [https://www.galvestonbeachy.com]
- How to Plant and Maintain Chokeberry Bushes [https://www.gardenhomes.org]
- New Query Store Enhancements in SQL Server 2022 [https://www.sqlsupport.org]
- Heat: Why My Laptop Is Cooking My Lap [https://www.SupportMyPC.com]
- The Best Months to Visit South Korea for Cherry Blossoms and Fall Colors [https://www.treasureholidays.com]
Privacy Policy for sqlsupport.org
Last updated: Feb 03, 2026
sqlsupport.org respects your privacy and is committed to protecting any personal information you may provide while using this website.
This Privacy Policy document outlines the types of information that are collected and recorded by sqlsupport.org and how we use it.
Information We Collect
- Internet Protocol (IP) addresses
- Browser type and version
- Pages visited
- Time and date of visits
- Referring URLs
- Device type
Cookies and Web Beacons
sqlsupport.org uses cookies to store information about visitors preferences and to optimize the users experience.
How We Use Your Information
- Operate and maintain our website
- Improve user experience
- Analyze traffic patterns
- Prevent fraudulent activity
Contact
Email: admin@sqlsupport.org