All pages
Powered by GitBook
1 of 72

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Securing MariaDB

Security

Secure your MariaDB Server. This section provides comprehensive guidance on user management, encryption, authentication, auditing, and other crucial security measures.

Running mariadbd as root

Understand the implications of running MariaDB Server as root. This section highlights security risks and provides guidance on configuring MariaDB Server to operate with less privileged user accounts.

MariaDB should never normally be run as the system's root user (this is unrelated to the MariaDB root user). If it is, any user with the FILE privilege can create or modify any files on the server as root.

MariaDB will normally return the error Fatal error: Please read "Security" section of the manual to find out how to run mariadbd as root! if you attempt to run mariadbd as root. If you need to override this restriction for some reason, start mariadbd with the user=root option.

Better practice, and the default in most situations, is to use a separate user, exclusively used for MariaDB. In most distributions, this user is called mysql.

This page is licensed: CC BY-SA / Gnu FDL

Data-in-Transit Encryption

Secure MariaDB Server data in transit with encryption. This section covers configuring SSL/TLS to protect communication between clients and the database, ensuring confidentiality and integrity.

Aria Encryption

Learn about Aria encryption in MariaDB Server for data at rest. This section details how to encrypt Aria tablespaces, providing enhanced security for your stored data.

InnoDB Encryption

Learn about InnoDB encryption for data at rest. This section details how to encrypt InnoDB tablespaces, ensuring strong data security and compliance for your mission-critical applications.

Key Management and Encryption Plugins

Explore key management and encryption plugins for MariaDB Server. This section details how to manage encryption keys and leverage plugins for robust data-at-rest protection.

Authentication with Enterprise Server

Learn about authentication with MariaDB Enterprise Server. This section covers advanced authentication methods & plugins to enhance security and integrate with enterprise identity management systems.

Catalogs

Catalogs are a user account management feature. This section explains their role in organizing database objects and controlling access permissions.

Encryption

Enhance MariaDB Server security with encryption. This section covers data-at-rest and in-transit encryption, helping you protect sensitive information and meet compliance requirements.

User Account Management

Master user account management in MariaDB Server. This section covers creating, modifying, and revoking user privileges to ensure secure and controlled access to your databases.

Roles

Manage roles in MariaDB Server for streamlined user access control. This section explains how to create, assign, and manage roles to simplify privilege management and enhance security.

Roles OverviewCREATE ROLEDROP ROLECURRENT_ROLESET ROLESET DEFAULT ROLEGRANTREVOKEmysql.roles_mapping TableInformation Schema APPLICABLE_ROLES TableInformation Schema ENABLED_ROLES Table

Limiting Size of Created Disk Temporary Files and Tables

The ability to limit the size of created disk temporary files and tables was introduced in MariaDB 11.5.

Data-at-Rest Encryption

Secure MariaDB Server data at rest with encryption. This section details how to protect your sensitive information stored on disk, ensuring data confidentiality and compliance.

Why Encrypt MariaDB Data?

Nearly everyone owns data of immense value: customer data, construction plans, recipes, product designs and other information. These data are stored in clear text on your storage media. Everyone with file system access is able to read and modify the data. If this data falls into the wrong hands (criminals or competitors) this may result in serious consequences.

With encryption you protect Data At Rest (see the Wikipedia article). That way, the database files are protected against unauthorized access.

When Does Encryption Help to Protect Your Data?

Encryption helps in case of threats against the database files:

  • An attacker gains access to the system and copies the database files to avoid the MariaDB authorization check.

  • MariaDB is operated by a service provider who should not gain access to the sensitive data.

When is Encryption No Help?

Encryption provides no additional protection against threats caused by authorized database users. Specifically, SQL injections aren’t prevented.

What to Encrypt?

All data that is not supposed to fall into possible attackers hands should be encrypted. Especially information, subject to strict data protection regulations, is to be protected by encryption (e.g. in the healthcare sector: patient records). Additionally, data being of interest for criminals should be protected. Data which should be encrypted are:

  • Personal related information

  • Customer details

  • Financial and credit card data

  • Public authorities' data

How to Handle Key Management?

There are currently three options for key management:

See for details.

This page is licensed: CC BY-SA / Gnu FDL

Aria Encryption Keys

As with other storage engines that support data-at-rest encryption, Aria relies on an Encryption Key Management plugin to handle its encryption keys. Where the support is available, Aria can use multiple keys.

Encryption Keys

MariaDB keeps track of each encryption key internally using a 32-bit integer, which serves as the key identifier. Unlike InnoDB, Aria does not support the ENCRYPTION_KEY_ID table option (for more information, see MDEV-18049), which allows the user to specify the encryption key to use. Instead, Aria defaults to specific encryption keys provided by the Encryption Key Management plugin.

  • When working with user-created tables, Aria encrypts them to disk using the ID 1 key.

  • When working with internal temporary tables written to disk, Aria encrypts them to disk using the ID 2 key, unless there is no ID 2 key, then it falls back on the ID 1 key.

Key Rotation

Some allow you to automatically rotate and version your encryption keys. If a plugin support key rotation, and if it rotates the encryption keys, then InnoDB's can re-encrypt InnoDB pages that use the old key version with the new key version. However, Aria does not have a similar mechanism, which means that the tables remain encrypted with the older key version. For more information, see .

In order for key rotation to work, both the backend key management service (KMS) and the corresponding have to support key rotation. See to determine which plugins currently support key rotation.

This page is licensed: CC BY-SA / Gnu FDL

Disabling Data-at-Rest Encryption for Standalone Servers

In certain situations, you may need to turn off data-at-rest encryption in a standalone or single-node MariaDB Enterprise Server deployment. For instance, you might have originally enabled encryption using a key management plugin, but later determine that encryption is no longer necessary.

This page explains how to safely disable data-at-rest encryption on a single server. The steps assume that your server already contains encrypted tables or logs, and that your goal is to revert the system to an unencrypted state without losing any data.

  • This procedure is only intended for standalone MariaDB Enterprise Server environments.

  • For replication or Galera Cluster setups, additional considerations are required and are not covered here.

  • Always back up your data before performing encryption or decryption operations.

Prerequisites

Before you can disable data-at-rest encryption in MariaDB Enterprise Server, ensure the following:

  • MariaDB Enterprise Server with Encryption Enabled The server must currently be running with data-at-rest encryption enabled.

  • Key Management Access You must have access to the same key management plugin and configuration that were originally used to encrypt the data.

  • Sufficient Disk Space Make sure adequate free disk space is available to decrypt and rewrite all affected data files.

Related Documentation

Decrypt InnoDB Tables

When data-at-rest encryption is enabled, InnoDB tables and tablespaces are transparently encrypted and decrypted by the storage engine. In some cases, administrators may need to decrypt an InnoDB table—for example, when migrating data to an environment where encryption is not required, or when disabling encryption to simplify configuration.

For more information, refer to, MDEV-17269.

Decrypting a Table

To decrypt a specific InnoDB table, use the ENCRYPTION clause with ALTER TABLE:

This statement rewrites the table in an unencrypted format.

  • If the table is stored in a file-per-table tablespace, the corresponding .ibd file is decrypted and rewritten.

  • If the table resides in the system tablespace, the data is also rewritten unencrypted.

Decrypting All Tables in a Schema

To decrypt all tables in a schema, you can generate and run ALTER TABLE statements programmatically:

Copy and execute the generated statements.

Verifying Decryption

After decryption, you can verify the encryption status of a table with:

If the table is unencrypted, the create_options column will not include ENCRYPTION="Y".

Uninstall Key Management Plugins

Once all data and logs have been decrypted, you can safely remove key management plugins, if desired. For example, if using the file key management plugin:

Comment out or remove the following lines 
plugin_load_add = file_key_management 
file_key_management_filename = /etc/mysql/encryption/keyfile

Restart the server after editing the configuration.

  • Ensure that all tables no longer report encryption in CREATE_OPTIONS.

  • Confirm that redo logs and binary logs are unencrypted by checking server variables and log headers.

  • Confirm that no key management plugin is loaded:

Catalog-Specific Functions and Variables

Catalog Functions

catalog()

`catalog()

returns the name of the current catalog.`

Catalog Variables

@@catalogs

One can check if a server supports catalogs with:

1 means that the server is configured for catalogs.

This page is licensed: CC BY-SA / Gnu FDL

DROP CATALOG

Syntax

DROP CATALOG catalog_name

Description

Deletes a catalog.

Limitations:

  • DROP CATALOG can only be performed by a super user in the 'def' catalog.

  • The current catalog cannot be dropped.

  • The 'def' catalog cannot be dropped.

When dropping a catalog, all databases and files within that catalog will be deleted.

See Also

This page is licensed: CC BY-SA / Gnu FDL

Certificate Creation with OpenSSL

Warning: the instructions below generate version 1 certificates only. These work fine with servers and clients using OpenSSL, but fail if WolfSSL is used instead, as is the case for our Windows MSI packages and our binary tarballs for Linux. WolfSSL requires version 3 certificates instead when using TLS v1.2 or higher, and so won't work with certificates generated as shown here when using two-way TLS with explicit client certificates. Generating version 3 certificates requires a few more minor steps, we will upgrade the instructions below soon to include these. See also:

In order to secure communications with the MariaDB Server using TLS, you need to create a private key and an X509 certificate for the server. You may also want to create additional private keys and X509 certificates for any clients that need to connect to the server with TLS. This guide covers how to create a private key and a self-signed X509 certificate with OpenSSL.

Certificate Creation

The library provides a command-line tool called

Aria Disabling Encryption

The process involved in safely disabling data-at-rest encryption for your Aria tables is very similar to that of enabling encryption. To disable, you need to set the relevant system variables and then rebuild each table into an unencrypted state.

Don't remove the plugin from your configuration file until you have unencrypted all tables in your database. MariaDB cannot read encrypted tables without the relevant encryption key.

Disabling Encryption on User-created Tables

With tables that the user creates, you can disable encryption by setting the system variable to OFF. Once this is set, MariaDB no longer encrypts new tables created with the Aria storage engine.

Decrypt InnoDB Redo Logs

When data-at-rest encryption is enabled in MariaDB Enterprise Server, InnoDB can encrypt redo logs. If you later disable encryption or need to recover data from encrypted redo logs, you may need to decrypt the redo log files before MariaDB can process them.

For more information, refer to .

  1. Stop MariaDB Enterprise Server

USE CATALOG

Syntax

Description

Changes to another . Can only be done by a super user in the 'def' catalog. Changing catalog will update catalog status and reset all session status.

A tenant (a user in any other catalog than 'def') cannot change to another catalog. However tenants can execute

SHOW CREATE CATALOG

Syntax

Description

Shows the statement that creates the given .

Catalog Status Variables

When using a MariaDB Server with support, all status information is collected for the whole server, per catalog and per session.

shows the status for the whole server. Note that only the super user in the 'def' catalog has privileges for the above statement.

Both commands show the status for the current catalog. The reason that GLOBAL shows catalog status is that because catalogs are 'multi-tenant', a catalog user should not be able to see the status from other users (for most things).

Shows the status for the current connection.

The main "new thing" is that catalogs enable SAS providers to see the status for a single tenant (catalog user). This makes it much easier to find 'bad neighbors' (tenants that cause problems for other tenants) so that they can be moved to other servers.

When the MariaDB server is not configured for catalogs, the following commands are equivalent:

Connecting to a Server Configured for Catalogs

When connecting to a MariaDB server configured for , one has to provide the catalog to connect to. There are several ways to do this:

All new native MariaDB clients will support the --catalog option:

New and old clients can use the 'catalog_name.database_name' syntax to connect:

This will connect the user to the 'mine' catalog and the database 'test'.

Note that one consequence of this is that one should not have a database that contains '.' in the name. If such a database exists, one can still connect to it by using the --catalog= option or prefixing the database with the catalog, like in def.data.base.name.

One will also be able to configure the MariaDB server to automatically choose catalogs depending on the port or IP they are using to connect to the server. This is done by adding the following to the catalog specific my.cnf file, residing in the catalog directory:

CREATE CATALOG

Define external catalogs for data integration. This statement configures connections to remote storage systems, allowing query access to external data sources.

Syntax

Description

Creates a and the mysql

Data-at-Rest Encryption
Aria Table Encryption
InnoDB Table Encryption
Construction plans and research and development results
File Key Management Plugin
AWS Key Management Plugin
Hashicorp Key Management Plugin
Encryption Key Management
key management and encryption plugins
background encryption threads
MDEV-18971
key management and encryption plugin
Encryption Key Management: Support for Key Rotation in Encryption Plugins
SHOW PLUGINS;
, which can be used for performing various tasks with the library, such as generating private keys, creating X509 certificate requests, signing X509 certificates as a Certificate Authority (CA), and verifying X509 certificates.

Creating a Certificate Authority Private Key and Certificate

The Certificate Authority (CA) is typically an organization (such as Let's Encrypt) that signs the X509 certificate and validates ownership of the domain. However, when you would like to use self-signed certificates, you need to create the private key and certificate for the CA yourself, and then you can use them to sign your own X509 certificates.

To start, generate a private key for the CA using the openssl genrsa command. For example:

After that, you can use the private key to generate the X509 certificate for the CA using the openssl req command. For example:

The above commands create two files in the working directory: The ca-key.pem private key and the ca.pem X509 certificate are both are used by the CA to create self-signed X509 certificates below.

Creating a Private Key and a Self-signed Certificate

Once you have the CA's private key and X509 certificate, you can create the self-signed X509 certificates to use for the MariaDB Server, client, replication and other purposes.

To start, generate a private key and create a certificate request using the openssl req command. For example:

After that, process the key to remove the passphrase using the openssl rsa command. For example:

Lastly, using the certificate request and the CA's private key and X509 certificate, you can generate a self-signed X509 certificate from the certificate request using the openssl x509 command. For example:

This creates a server-cert.pem file, which is the self-signed X509 certificate.

Certificate Verification

Once you have created the CA's X509 certificate and a self-signed X509 certificate, you can verify that the X509 certificate was correctly generated using the openssl verify command. For example:

You can add as many X509 certificates to check against the CA's X509 certificate as you want to verify. A value of OK indicates that you can use it was correctly generated and is ready for use with MariaDB.

This page is licensed: CC BY-SA / Gnu FDL

MDEV-25701
OpenSSL
openssl
Unlike InnoDB, Aria does not currently use background encryption threads. Before removing the Encryption Key Management plugin from the configuration file, you first need to manually rebuild each table to an unencrypted state.

To find the encrypted tables, query the Information Schema, filtering the TABLES table for those that use the Aria storage engine and the PAGE ROW_FORMAT.

Each table in the result-set was potentially written to disk in an encrypted state. Before removing the configuration for the encryption keys, you need to rebuild each of these to an unencrypted state. This can be done with an ALTER TABLE statement.

Once all of the Aria tables are rebuilt, they're safely unencrypted.

Disabling Encryption for Internal On-disk Temporary Tables

MariaDB routinely creates internal temporary tables. When these temporary tables are written to disk and the aria_used_for_temp_tables system variable is set to ON, MariaDB uses the Aria storage engine.

To decrypt these tables, set the encrypt_tmp_disk_tables to OFF. Once set, all internal temporary tables that are created from that point on are written unencrypted to disk.

This page is licensed: CC BY-SA / Gnu FDL

Encryption Key Management
aria_encrypt_tables
ALTER TABLE mydb.mytable ENCRYPTION='N';
SELECT CONCAT('ALTER TABLE ', table_schema, '.', table_name, ' ENCRYPTION="N";')
FROM information_schema.tables
WHERE engine='InnoDB'
  AND table_schema='mydb';
SELECT table_name, create_options
FROM information_schema.tables
WHERE table_schema='mydb';
# openssl genrsa 2048 > ca-key.pem
# openssl req -new -x509 -nodes -days 365000 \
      -key ca-key.pem -out ca.pem
# openssl req -newkey rsa:2048 -days 365000 \
      -nodes -keyout server-key.pem -out server-req.pem
# openssl rsa -in server-key.pem -out server-key.pem
# openssl x509 -req -in server-req.pem -days 365000 \
      -CA ca.pem -CAkey ca-key.pem -set_serial 01 \
      -out server-cert.pem
# openssl verify -CAfile ca.pem server-cert.pem
server-cert.pem: OK
SET GLOBAL aria_encrypt_tables = OFF;
SELECT TABLE_SCHEMA, TABLE_NAME
FROM information_schema.TABLES
WHERE ENGINE = 'Aria'
  AND ROW_FORMAT = 'PAGE'
  AND TABLE_SCHEMA != 'information_schema';
ALTER TABLE test.aria_table ENGINE = Aria ROW_FORMAT = PAGE;
Locate the redo log files By default, InnoDB redo log files are stored in the data directory, typically as:

or in the #innodb_redo directory for MariaDB versions using the new redo log format.

  • Prepare configuration for decryption

    • Make sure innodb_redo_log_encrypt is set to ON (to ensure the redo logs are recognized as encrypted).

    • Ensure that the key management plugin (such as file_key_management or aws_key_management) is configured exactly as it was when the redo logs were created.

    Example:

  • Start MariaDB with decryption enabled

    • Start the server normally. MariaDB will automatically attempt to decrypt redo logs at startup using the configured key management plugin.

    • If successful, the redo logs are decrypted on-the-fly and crash recovery proceeds.

  • Disable redo log encryption if no longer required After recovery or once you confirm that decrypted redo logs are no longer needed, you can disable redo log encryption in the configuration:

    Then restart the server. New redo logs will be created in plaintext.

  • Verification

    You can verify the redo log encryption status with:

    Example output:

    MDEV-17270
    USE CATALOG current_catalog
    . This is to allow the user to import SQL scripts that use
    USE CATALOG...
    .

    See Also

    • USE database. Changing database.

    This page is licensed: CC BY-SA / Gnu FDL

    USE CATALOG catalog_name
    catalog
    Examples

    See Also

    • CREATE CATALOG

    • Character Sets and Collations

    This page is licensed: CC BY-SA / Gnu FDL

    SHOW CREATE CATALOG catalog_name
    CREATE CATALOG
    catalog
    See Also
    • SHOW STATUS

    This page is licensed: CC BY-SA / Gnu FDL

    SHOW SERVER STATUS;
    SHOW GLOBAL STATUS;
    SHOW CATALOG STATUS;
    SHOW [SESSION] STATUS;
    catalogs
    If catalogs is not specified either directly (---catalog=#) or indirectly (with port or ip) the catalog
    def
    will be used.

    When connecting to a server not configured for catalogs, one can still use mariadb --catalog=def or mariadb def.datbase_name.

    To check if a server supports catalogs:

    0 means that the server is not configured for catalogs.

    This page is licensed: CC BY-SA / Gnu FDL

    mariadb --catalog=mine test
    mariadb mine.test
    [[mariadbd]]
    --port=#
    --connect-ip=
    catalogs
    ,
    sys
    and
    performance_schema
    schemas inside the catalog.

    CREATE CATALOG can only be performed by a user in the def catalog with the CATALOG privilege.

    Note that no users are created.

    Example

    Limitations

    The catalog name is limited to 64 characters. All characters must be in the basic ASCII set: (A-Z, a-z, -, _) This limitations is to be able to run catalogs with engines like InnoDB which has limited space in their internal data dictionary.

    Pre-Creating Catalog Directories

    CREATE CATALOG works even if the catalog directory already exists (as long as there is no mysql sub directory). This is to allow a database administrator to pre-create the catalog directory and mount it to disk volume and optionally add a configuration file inside the catalog directory. The directory will not be recognized as a catalog or show up in SHOW CATALOGS until the mysql sub directory is created by CREATE CATALOG or mariadb-install-db.

    See Also

    • marriadb-install-db can be used to create multiple catalogs with a default root user in one go.

    • DROP CATALOG

    This page is licensed: CC BY-SA / Gnu FDL

    catalog
    MariaDB [def.test]> select catalog();
    +-----------+
    | catalog() |
    +-----------+
    | def       |
    +-----------+
    CREATE CATALOG

    Aria Encryption Overview

    MariaDB can encrypt data in tables that use the Aria storage engine. This includes both user-created tables and internal on-disk temporary tables that use the Aria storage engine. This ensures that your Aria data is only accessible through MariaDB.

    For encryption with the InnoDB and XtraDB storage engines, see Encrypting Data for InnoDB/XtraDB.

    Basic Configuration

    In order to enable encryption for tables using the Aria storage engine, there are a couple server system variables that you need to set and configure. Most users will want to set aria_encrypt_tables and encrypt_tmp_disk_tables.

    Users of data-at-rest encryption will also need to have a key management and encryption plugin configured. Some examples are File Key Management Plugin and AWS Key Management Plugin.

    Determining Whether a Table is Encrypted

    The has the that can be used to get information about which tables are encrypted. Aria does not currently have anything like that (see about that).

    To determine whether an Aria table is encrypted, you currently have to search the data file for some plain text that you know is in the data.

    For example, let's say that we have the following table:

    Then, we could search the data file that belongs to db1.aria_tab for str1 using a command-line tool, such as :

    If you can find the plain text of the string, then you know that the table is not encrypted.

    Encryption and the Aria Log

    Only Aria tables are currently encrypted. The is not yet encrypted. See about that.

    This page is licensed: CC BY-SA / Gnu FDL

    Decrypt Aria Tables

    This page describes how to decrypt datdata at resta-at-rest for tables that use the Aria storage engine.

    If you have Aria tables encrypted, you must first decrypt them:

    Repeat this for each Aria table that is encrypted.

    For more information, refer to MDEV-17268.

    • Ensure the server can currently read encrypted data Keep your key management/encryption plugin configured and loaded so MariaDB can read existing encrypted Aria tables. Don’t remove the plugin yet. MariaDB

    • Turn off Aria encryption for future writes Set the global variable to off and restart if set in config:

      Also set in the option file to persist:

      With encryption disabled, any newly rebuilt Aria table will be written unencrypted.

    • Rebuild Aria tables to rewrite them unencrypted Rebuilding causes MariaDB to rewrite data and index files (.MAD/.MAI) in the current (now unencrypted) mode. Typical ways to rebuild:

      • ALTER TABLE t ENGINE=Aria;

      • ALTER TABLE t ALGORITHM=COPY; (forces a copy/rebuild)

    • Repeat for all Aria tables you want decrypted Generate statements for every Aria table:

      Review and run the generated DDL. (System tables may use Aria in newer releases—handle with care.)

    • Verify and then remove encryption dependencies (optional) Once all targeted Aria tables are rebuilt and unencrypted, and you have no other encrypted assets relying on the plugin (e.g., InnoDB encryption, binlog encryption), you can remove or disable the key management/encryption plugin.

    Decrypt Binary Logs

    This page covers how to confirm that binlogs are encrypted, recommended approaches for getting decrypted output.

    When binary log encryption is enabled, the server writes binlog files to disk in encrypted form. This ensures that anyone with direct access to the filesystem cannot read the contents.

    The encryption keys are managed through a keyring or key-management plugin. Whenever the server itself needs to access a binlog—such as during replication, recovery, or when tools like mysqlbinlog connect to it—the server transparently decrypts the events using the appropriate active keys.

    Since the keys are stored in a server-accessible keyring, the most reliable and secure method to access decrypted binlog data is to request it directly from the running server. In other words, instead of trying to decrypt raw encrypted files offline, you should allow the server to stream already-decrypted events to you.

    For more information, refer to MDEV-17271.

    Approaches to decrypt binary logs

    There are two common approaches depending on where you run the decryption and how keys are stored:

    1. Run mysqlbinlog on a server that already has access to the key material (recommended).

      • The server's key provider configuration (for example, a mounted key file or KMS credentials) is already present, so mysqlbinlog inherits the ability to open and decrypt logs.

      • This reduces key distribution since the keys remain on the server.

    Using mysqlbinlog to decrypt

    mysqlbinlog will attempt to decrypt binary logs when launched in an environment that allows it to access the same key provider configuration used by the server.

    Basic example (server with key access):

    If the environment is correctly configured, mysqlbinlog will read, decrypt, and write the plaintext SQL (events) to decrypted.sql.

    Decrypting compressed or rotated logs

    If your environment compresses or rotates binary logs outside the standard server rotation, decompress the file before passing to mysqlbinlog (or use process substitution):

    Decrypt local binlog to file:

    Decrypt and decode row events verbosely:

    Decrypt from a compressed backup:

    Incrementing of the access_denied_errors status variable

    The access_denied_errors status variable is incremented when someone tries to access something they do not have rights to.

    This happens in the following cases:

    • When accessing a database, table, or column that the user does not have rights to access. The error is sent to the client.

    • When a login fails because of the wrong user/password, etc. The error is printed to the general log.

    • When the require_secure_transport option is enabled on the server, and the user has not used a secure transport. The error is sent to the client.

    • Users try to change to a database/schema they do not have access to. A warning is written to the error log if log_warnings > 1.

    • Users try to use a SHOW command to access an object they do not have rights to see. The error is sent to the client.

    • Users access something that requires global access, like "CREATE SERVER". The error is sent to the client.

    Login failures can be found in the . Errors that are sent to the client can be found by using the . The plugin captures all errors sent to the client. Starting from , it can also optionally capture all warnings sent to the client.

    See Also

    This page is licensed: CC BY-SA / Gnu FDL

    Authentication with gssapi

    Overview

    The gssapi authentication plugin validates user credentials against a GSSAPI-based authentication service, like Kerberos or NTLM.

    Install Package

    The gssapi authentication plugin requires an additional package to be installed on Linux. On CentOS, RHEL, and Rocky Linux:

    On Debian and Ubuntu:

    On SLES:

    Configure

    The gssapi requires some system variables to be configured, including:

    • gssapi_keytab_path

    • gssapi_principal_name

    For example:

    Install Plugin

    The gssapi must be installed before it can be used.

    To install with the INSTALL SONAME statement:

    To install in a configuration file with the plugin_load_add option:

    Create User

    To create a user account that uses the gssapi , specify the plugin in the CREATE USER statement:

    An optional realm can be specified:

    This page is: Copyright © 2025 MariaDB. All rights reserved.

    SHOW CATALOGS

    Syntax

    Description

    SHOW CATALOGS lists the catalogs on the MariaDB server host. The LIKE clause, if present on its own, indicates which catalog names to match. The WHERE and LIKE clauses can be given to select rows using more general conditions, as discussed in .

    You see only use SHOW CATALOGS have the . Only users of the 'def' schema can have this privilege.

    If the server was started with the option, you cannot use this statement unless you have the .

    The list of results returned by SHOW CATALOGS is based on directories in the data directory, which is how MariaDB implements catalogs. It only list directories that have a mysql directory.

    The also contains catalog information.

    Examples

    See Also

    This page is licensed: CC BY-SA / Gnu FDL

    Authentication for MariaDB Enterprise Server

    Overview

    MariaDB Enterprise Server authentication is performed by database user accounts. Database user accounts are specified by user name, the hostname from which the account is connecting, and the authentication plugins configured for the account, such as mysql_native_password, pam, or unix_socket.

    Change Password

    The password for a can be changed using the , , and statements.

    Password Validation Plugins

    If your MariaDB Enterprise Server node has a password validation plugin installed, then the password should also meet the configured requirements. When you try to set or change a user's password and the password validation plugin rejects the password, the following error message will be shown:

    By default, the MariaDB Enterprise Server installs the plugin, but the plugin is also available.

    For , the password requirements are configured by several system variables:

    Authentication Plugins

    MariaDB Enterprise Server uses authentication plugins to support different authentication methods. The default authentication plugin is mysql_native_password.

    This page is: Copyright © 2025 MariaDB. All rights reserved.

    Starting with Catalogs

    Background

    mariadb-install-db initializes the MariaDB data directory and creates the system tables in the mysql database.

    When used with the --catalog options it will initialize MariaDB server to use catalogs. The mariadbd server will automatically discover if catalogs are used or not.

    Note that one cannot change a 'normal server' to a server with catalogs or a server with catalogs to a 'normal server'. In the future we will add tools that will allow one to easily move an existing server inside a catalog or move an server inside a catalog to a standalone server.

    Initializing a New Server with Catalog Support

    To initialize a server with 4 catalogs (the def catalog, that holds the catalog root user (CRU) is automatically created):

    The above will create a directory /my/data and the 4 directories under it, one for each catalog.

    Adding More Catalogs to a Running Server

    Creating Catalogs with CREATE CATALOG

    One can create a new catalog with

    Creating Catalogs with mariadb_install_db

    When adding more catalogs to an existing server, mariadb_install_db will start the to execute the needed commands on the running server. This is why one has to supply user and password to mariadb_install_db.

    One benefit of using mariadb_install_db is that it's possible to create many catalogs with one command.

    See Also

    This page is licensed: CC BY-SA / Gnu FDL

    Using TLSv1.3

    OpenSSL 1.1.1 introduced support for TLSv1.3. TLSv1.3 is a major rewrite of the TLS protocol. Some even argued it should've been called TLSv2.0. One of the changes is that it introduces a new set of cipher suites that only work with TLSv1.3. Additionally, TLSv1.3 does not support cipher suites from previous TLS protocol versions.

    This incompatible change had a non-obvious consequence. If a user had been explicitly specifying cipher suites to disable old and obsolete TLS protocol version, then that user may have also inadvertently prevented TLSv1.3 from working, unless the user remembered to add the TLSv1.3 cipher suites to their cipher list. After upgrading to OpenSSL 1.1.1, this user might believe they are using TLSv1.3, when their existing cipher suite configuration might be preventing it.

    To avoid this problem, OpenSSL developers decided that TLSv1.3 cipher suites should not be affected by the normal cipher-selecting API. This means that ssl_cipher system variable has no effect on the TLSv1.3 cipher suites.

    See this OpenSSL blog post and GitHub issue for more information.

    See Also

    This page is licensed: CC BY-SA / Gnu FDL

    max_tmp_session_space_usage System Variable

    max_tmp_session_space_usage

    • Description: The maximum total size of temporary file and temporary table usage. A value of 0 disables this feature. Set in blocks of 65536, rounded down if not a multiple of 65536. See Limiting Size of Created Disk Temporary Files and Tables Overview for details. Named max_tmp_space_usage in only.

    • Commandline: --max-tmp-session-space-usage=num

    • Scope: Global, Session

    • Dynamic: Yes

    • Data Type: numeric (bigint unsigned)

    • Default Value: 1099511627776

    • Range: 0 to 18446744073709551615 (blocks of 65536)

    • Introduced:

    This page is licensed: CC BY-SA / Gnu FDL

    max_tmp_total_space_usage System Variable

    max_tmp_total_space_usage

    • Description: The maximum total size in bytes of all temporary file and temporary table usage over all connections. A value of 0 disables this feature. Set in blocks of 65536, rounded down if not a multiple of 65536. See Limiting Size of Created Disk Temporary Files and Tables Overview for details. Called max_total_tmp_space_usage in only.

    • Commandline: --max-tmp-total-space-usage=num

    • Scope: Global

    • Dynamic: Yes

    • Data Type: numeric (bigint unsigned)

    • Default Value: 1099511627776

    • Range: 0 to 18446744073709551615 (blocks of 65536)

    • Introduced:

    This page is licensed: CC BY-SA / Gnu FDL

    Requiring TLS on MariaDB Server

    Overview

    and MariaDB Community Server support data-in-transit encryption, which secures data transmitted over the network. The server and the clients encrypt data using the Transport Layer Security (TLS) protocol, which is a newer version of the Secure Socket Layer (SSL) protocol.

    TLS must be manually enabled on the server.

    System`s Users, Roles, and Privileges

    {% hint style="info" %} Important: The PUBLIC role is created implicitly by GRANT statements and its creation is not logged, distinguishing it from standard system principals. {% endhint %}

    MariaDB automatically creates several users and roles for administrative and internal server functions.

    System Users

    These user accounts are created by the mariadb-install-db script during the initial server setup.

    sudo systemctl start mariadb
    [mysqld]
    innodb_redo_log_encrypt = OFF
    sudo systemctl stop mariadb
    ib_logfile0
    ib_logfile1
    SHOW GLOBAL VARIABLES LIKE 'innodb_redo_log_encrypt';
    +------------------------+-------+
    | Variable_name          | Value |
    +------------------------+-------+
    | innodb_redo_log_encrypt| OFF   |
    +------------------------+-------+
    SHOW CREATE CATALOG def;
    +---------+-------------------------------------------------------------------------------------------------------+
    | Catalog | Create Catalog                                                                                        |
    +---------+-------------------------------------------------------------------------------------------------------+
    | def     | CREATE CATALOG `def` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci COMMENT 'default catalog' |
    +---------+-------------------------------------------------------------------------------------------------------+
    SHOW GLOBAL STATUS
    SHOW SERVER STATUS 
    SHOW CATALOG STATUS
    SELECT @@catalogs;
    +------------+
    | @@catalogs |
    +------------+
    |          0 |
    +------------+
    USE catalog foo;
    ERROR 4193 (HY000): MariaDB is not configured to support catalogs
    CREATE CATALOG [IF NOT EXISTS] catalog_name
        [create_specification] ...
    
    create_specification:
        [DEFAULT] CHARACTER SET [=] charset_name
      | [DEFAULT] COLLATE [=] collation_name
      | COMMENT [=] 'comment'
    CREATE CATALOG cat1;
    USE CATALOG cat1;
    CREATE USER root@localhost;
    GRANT ALL PRIVILEGES ON *.* TO root@localhost;
    CREATE DATABASE test;
    SELECT @@catalogs;
    +------------+
    | @@catalogs |
    +------------+
    |          1 |
    +------------+
    [mariadb]
    ...
    
    # File Key Management
    plugin_load_add = file_key_management
    file_key_management_filename = /etc/mysql/encryption/keyfile.enc
    file_key_management_filekey = FILE:/etc/mysql/encryption/keyfile.key
    file_key_management_encryption_algorithm = AES_CTR
    
    # Aria Encryption
    aria_encrypt_tables=ON
    encrypt_tmp_disk_tables=ON
    ALTER TABLE my_table ENCRYPTED=NO;
    SHOW CATALOGS
        [LIKE 'pattern' | WHERE expr]
    general log
    SQL Error Log Plugin
    MariaDB 10.11.5
    Troubleshooting Connection Issues
    GRANT
    Error 1045: Access denied for user (using password)
    Secure Connections Overview

    Catalogs are planned for an upcoming release, and don't yet appear in any current releases.

    Catalogs are planned for an upcoming release, and don't yet appear in any current releases.

    Catalogs are planned for an upcoming release, and don't yet appear in any current releases.

    Catalogs are planned for an upcoming release, and don't yet appear in any current releases.

    Catalogs are planned for an upcoming release, and don't yet appear in any current releases.

    Catalogs are planned for an upcoming release, and don't yet appear in any current releases.

    Catalogs are planned for an upcoming release, and don't yet appear in any current releases.

    Catalogs are planned for an upcoming release, and don't yet appear in any current releases.

    InnoDB storage engine
    information_schema.INNODB_TABLESPACES_ENCRYPTION table
    MDEV-17324
    strings
    Aria log
    MDEV-8587

    Copy encrypted binlog files to an admin workstation and decrypt locally.

    • Requires secure transfer of the encrypted binlog file(s) and the decryption key or key-access configuration to the workstation.

    • Use this only when you can ensure secure temporary storage and key handling.

    authentication plugin
    authentication plugin
    authentication plugin
    Extended SHOW
    CATALOG privilege
    --skip-show-database
    SHOW DATABASES privilege
    Information Schema Catalogs table
    CREATE CATALOG
    Character Sets and Collations
    Information Schema CATALOG Table

    Catalogs are planned for an upcoming release, and don't yet appear in any current releases.

    Authentication with pam
  • Authentication with unix_socket

  • Authentication with PARSEC

  • database user account
    ALTER TABLE
    ALTER USER
    SET PASSWORD
    simple_password_check
    cracklib_password_check
    simple_password_check
    simple_password_check_digits
    imple_password_check_letters_same_case
    simple_password_check_minimal_length
    simple_password_check_other_characters
    Authentication with ed25519
    Authentication with gssapi
    Authentication with mysql_native_password
    Authentication with mysql_old_password
    CREATE CATALOG catalog_name
    mariadb client
    CREATE CATALOG
    DROP CATALOG
    mariadb-install-db

    Catalogs are planned for an upcoming release, and don't yet appear in any current releases.

    OPTIMIZE TABLE t; (for Aria this rebuilds the table)

    Example (single table):

    MariaDB
    MariaDB
    root@localhost

    Creation

    Created automatically by mariadb-install-db.

    Purpose

    Serves as the primary administrative account for initial server setup and management.

    Management

    It is highly recommended to secure this account immediately after installation. Standard security practices include setting a strong password, renaming the account, or removing it entirely in favor of other named administrative accounts.

    mariadb-sys@localhost

    Creation

    Created automatically by mariadb-install-db.

    Purpose

    A mandatory system user required for internal server operations, such as executing scheduled events.

    Management

    This user account is essential for server functionality and is protected;

    it cannot be dropped.

    System Roles

    These roles are built into the server and have special behaviors.

    The PUBLIC Role

    The PUBLIC role is a special, built-in concept that represents every user on the server.

    Creation

    The PUBLIC role is created implicitly by the server the first time a GRANT ... TO PUBLIC statement is executed. It is not created with CREATE ROLE.

    Purpose

    It provides a convenient way to grant privileges server-wide without having to grant them to each user individually. Privileges granted to PUBLIC are inherited by all existing and future users.

    Management & Security:

    • Because the PUBLIC role is created implicitly, its creation is not written to the audit log or binary log as a standard DDL event. This is a critical detail for security auditing.

    • The PUBLIC role cannot be explicitly dropped with DROP ROLE.

    • To audit the privileges that apply to all users, you must check the grants for PUBLIC directly.

    Syntax Examples:

    [mysqld]
    plugin_load_add = file_key_management
    file_key_management_filename = /etc/mysql/encryption/keyfile.enc
    file_key_management_filekey = FILE:/etc/mysql/encryption/keyfile.key
    innodb_redo_log_encrypt = ON
    SELECT * FROM db1.aria_tab LIMIT 1;
    +----+------+
    | id | str  |
    +----+------+
    |  1 | str1 |
    +----+------+
    1 row IN SET (0.00 sec
    $ sudo strings /var/lib/mysql/db1/aria_tab.MAD | grep "str1"
    str1
    # On the MariaDB server (or a host with access to key material)mysqlbinlog /var/lib/mysql/binlog.000012 > decrypted.sql
    gzip -dc /backup/binlog.000012.gz | mysqlbinlog - > decrypted.sql
    mysqlbinlog /var/lib/mysql/binlog.000012 > /tmp/binlog.000012.sql
    mysqlbinlog --base64-output=DECODE-ROWS --verbose /var/lib/mysql/binlog.000012 > /tmp/binlog.decoded.sql
    gzip -dc /backup/binlog.000012.gz | mysqlbinlog - > /tmp/binlog.000012.sql
    $ sudo yum install MariaDB-gssapi-server
    $ sudo apt install mariadb-plugin-gssapi-server
    $ sudo zypper install MariaDB-gssapi-server
    [mariadb]
    ...
    gssapi_keytab_path=KEYTAB_PATH
    gssapi_principal_name=PRINCIPAL_NAME
    INSTALL SONAME 'gssapi';
    [mariadb]
    ...
    plugin_load_add = auth_gssapi
    CREATE USER 'USER'@'192.0.2.%'
       IDENTIFIED VIA gssapi;
    CREATE USER 'USER'@'192.0.2.%'
       IDENTIFIED VIA gssapi USING 'USER@DOMAIN';
    +---------+--------------------+
    | Catalog | Comment            |
    +---------+--------------------+
    | c1      | This is catalog c1 |
    | cat2    |                    |
    | def     | default catalog    |
    +---------+--------------------+
    SHOW CATALOGS LIKE 'c%';
    +--------------+--------------------+
    | Catalog (c%) | Comment            |
    +--------------+--------------------+
    | c1           | This is catalog c1 |
    | cat2         |                    |
    +--------------+--------------------+
    WITH ALTER USER:
    
    ALTER USER 'USER'@'192.0.2.%'
       IDENTIFIED BY 'PASSWD';
    WITH SET PASSWORD:
    
    SET PASSWORD FOR 'USER'@'192.0.2.%'
       = PASSWORD('PASSWD');
    ERROR HY000: Your password does not satisfy the current policy requirements.
    mariadb_install_db --catalogs="cat1 cat2 cat3" --datadir=/my/data/
    mariadb_install_db --catalogs="cat4 cat5 cat6" --datadir=/my/data --catalog-user=monty --catalog-password
    -- Immediate effect for the running instance
    SET GLOBAL aria_encrypt_tables = OFF;
    [mysqld]
    aria_encrypt_tables=OFF
    SELECT CONCAT('ALTER TABLE `', table_schema, '`.`', table_name, 
                  '` ENGINE=Aria, ALGORITHM=COPY;') AS ddl
    FROM information_schema.tables
    WHERE ENGINE='Aria'
      AND table_schema NOT IN ('mysql','information_schema','performance_schema','sys');
    ALTER TABLE db1.my_aria_table ENGINE=Aria, ALGORITHM=COPY, LOCK=SHARED;
    -- Grant a privilege to all users
    GRANT SELECT ON my_app.reports TO PUBLIC;
    
    -- View privileges granted to PUBLIC
    SHOW GRANTS FOR PUBLIC;
    
    -- Revoke a privilege from all users
    REVOKE SELECT ON my_app.reports FROM PUBLIC;
    Enabling TLS
    1. Acquire an X509 certificate and a private key for the server. If it is a test or development server, then self-signed certificates and keys might be sufficient.

    2. Determine which system variables and options you need to configure. Mandatory system variables and options for TLS include:

    System Variable/Option
    Description

    When this option is enabled, connections attempted using insecure transport will be rejected. Secure transports are SSL/TLS, Unix sockets, or named pipes.

    X509 cert in PEM format

    X509 key in PEM format

    JCA file in PEM format

    Useful system variables and options for TLS include:

    System Variable/Option
    Description

    CA directory

    SSL cipher to use

    CRL file in PEM format

    CRL directory

    TLS protocol version for secure connections.

    1. Choose a configuration file in which to configure your system variables and options. It is not recommended to make custom changes to one of the bundled configuration files. Instead, it is recommended to create a custom configuration file in one of the included directories. Configuration files in included directories are read in alphabetical order. If you want your custom configuration file to override the bundled configuration files, then it is a good idea to prefix the custom configuration file's name with a string that will be sorted last, such as z-.

    • On RHEL, CentOS, Rocky Linux, and SLES, a good custom configuration file would be: /etc/my.cnf.d/z-custom-my.cnf

    • On Debian and Ubuntu, a good custom configuration file would be: /etc/mysql/mariadb.conf.d/z-custom-my.cnf

    1. Set your system variables and options in the configuration file. They need to be set in a group that will be read by MariaDB Server, such as [mariadb] or [server]. For example:

    1. Restart the server.

    1. Connect to the server using MariaDB Client:

    1. Confirm that TLS is enabled by confirming that the have_ssl system variable is YES with the SHOW GLOBAL VARIABLES statement:

    This page is: Copyright © 2025 MariaDB. All rights reserved.

    MariaDB Server

    InnoDB Background Encryption Threads

    InnoDB performs some encryption and decryption operations with background encryption threads. The innodb_encryption_threads system variable controls the number of threads that the storage engine uses for encryption-related background operations, including encrypting and decrypting pages after key rotations or configuration changes, and scrubbing data to permanently delete it.

    Background Operations

    InnoDB performs the following encryption and decryption operations using background encryption threads:

    • When rotating encryption keys, InnoDB's background encryption threads re-encrypt pages that use key versions older than to the new key version.

    • When changing the system variable to FORCE, InnoDB's background encryption threads encrypt the tablespace and any tablespaces that have the table option set to DEFAULT.

    • When changing the system variable to OFF, InnoDB's background encryption threads decrypt the tablespace and any tablespacs that have the ENCRYPTED table option set to DEFAULT.

    The system variable can be used to configure how many I/O operations you want to allow for the operations performed by InnoDB's background encryption threads.

    Whenever you change the value on the system variable, InnoDB's background encryption threads perform the necessary encryption or decryption operations. Because of this, you must have a non-zero value set for the system variable. InnoDB also considers these operations to be key rotations internally. Because of this, you must have a non-zero value set for the system variable. For more information, see .

    Non-Background Operations

    InnoDB performs the following encryption and decryption operations without using background encryption threads:

    • When a tablespaces and using to manually set the table option to YES, InnoDB does not use background threads to encrypt the tablespaces.

    • Similarly, when using file-per-table tablespaces and using to manually set the table option to NO, InnoDB does not use background threads to decrypt the tablespaces.

    In these cases, InnoDB performs the encryption or decryption operation using the server thread for the client connection that executes the statement. This means that you can update encryption on tablespaces with an statement, even when the and/or the system variables are set to 0.

    InnoDB does not permit manual encryption changes to tables in the tablespace using . Encryption of the tablespace can only be configured by setting the value of the system variable. This means that when you want to encrypt or decrypt the tablespace, you must also set a non-zero value for the system variable, and you must also set the system variable to 1 to ensure that the system tablespace is properly encrypted or decrypted by the background threads. See for more information.

    Checking the Status of Background Operations

    InnoDB records the status of background encryption operations in the table in the database.

    For example, to see which InnoDB tablespaces are currently being decrypted or encrypted on by background encryption, you can check which InnoDB tablespaces have the ROTATING_OR_FLUSHING column set to 1:

    And to see how many InnoDB tablespaces are currently being decrypted or encrypted by background encryption threads, you can call the aggregate function.

    And to see how many InnoDB tablespaces are currently being decrypted or encrypted by background encryption threads, while comparing that to the total number of InnoDB tablespaces and the total number of encrypted InnoDB tablespaces, you can join the table with the table in the database:

    This page is licensed: CC BY-SA / Gnu FDL

    Encryption Key Management

    MariaDB's data-at-rest encryption requires the use of a key management and encryption plugin. These plugins are responsible both for the management of encryption keys and for the actual encryption and decryption of data.

    MariaDB supports the use of multiple encryption keys. Each encryption key uses a 32-bit integer as a key identifier. If the specific plugin supports key rotation, then encryption keys can also be rotated, which creates a new version of the encryption key.

    Supported Key Management Plugins list

    Plugin
    Status
    Key Rotation Support
    Notes

    Choosing an Encryption Key Management Solution

    How MariaDB manages encryption keys depends on which encryption key management solution you choose. Currently, MariaDB has three options:

    File Key Management Plugin

    The File Key Management plugin that ships with MariaDB is a basic key management and encryption plugin that reads keys from a plain-text file. It can also serve as an example and as a starting point when developing a key management plugin.

    For more information, see .

    Hashicorp Key Management Plugin

    Integrates MariaDB encryption with Vault for secure key management.

    For more information, refer to the .

    AWS Key Management Plugin

    The AWS Key Management plugin is a key management and encryption plugin that uses the Amazon Web Services (AWS) Key Management Service (KMS). The AWS Key Management plugin depends on the , which uses the . The license is not compatible with MariaDB Server's , so we are not able to distribute packages that contain the AWS Key Management plugin. Therefore, the only way to currently obtain the plugin is to install it from the source.

    For more information, see .

    Using Multiple Encryption Keys

    Key management and encryption plugins support using multiple encryption keys. Each encryption key can be defined with a different 32-bit integer as a key identifier.

    The support for multiple keys opens up some potential use cases. For example, let's say that a hypothetical key management and encryption plugin is configured to provide two encryption keys. One encryption key might be intended for "low security" tables. It could use short keys, which might not be rotated, and data could be encrypted with a fast encryption algorithm. Another encryption key might be intended for "high security" tables. It could use long keys, which are rotated often, and data could be encrypted with a slower but more secure encryption algorithm. The user would specify the identifier of the key that they want to use for different tables, only using high-level security where it's needed.

    There are two encryption key identifiers that have special meanings in MariaDB. An encryption key 1 is intended for encrypting system data, such as InnoDB redo logs, binary logs, and so on. It must always exist when is enabled. An encryption key 2 is intended for encrypting temporary data, such as temporary files and temporary tables. It is optional. If it doesn't exist, then MariaDB uses an encryption key 1 for these purposes instead.

    When , the key that is used to encrypt tables .

    When , the key that is used to encrypt tables .

    Key Rotation

    Encryption key rotation is optional in MariaDB Server. Key rotation is only supported if the backend key management service (KMS) supports key rotation and if the corresponding key management and encryption plugin for MariaDB also supports key rotation. When a key management and encryption plugin supports key rotation, users can opt to rotate one or more encryption keys, which creates a new version of each rotated encryption key.

    Key rotation allows users to improve data security in the following ways:

    • If the server is configured to automatically re-encrypt table data with the newer version of the encryption key after the key is rotated, then that prevents an encryption key from being used for long periods of time.

    • If the server is configured to simultaneously encrypt table data with multiple versions of the encryption key after the key is rotated, then that prevents all data from being leaked if a single encryption key version is compromised.

    The has that can .

    The does .

    Support for Key Rotation in Encryption Plugins

    Encryption Plugins with Key Rotation Support

    • The supports encryption key rotation, and the corresponding also supports encryption key rotation.

    • HashiCorp Key Management Plugin: The HashiCorp Key Management Plugin integrates MariaDB with for centralized encryption key storage and lifecycle management. environments.

    Encryption Plugins without Key Rotation Support

    • The does not support encryption key rotation because it does not use a backend key management service (KMS).

    Encryption Plugin API

    New key management and encryption plugins can be developed using the .

    This page is licensed: CC BY-SA / Gnu FDL

    User Password Expiry

    Password expiry permits administrators to expire user passwords, either manually or automatically.

    System Variables

    There are two system variables which affect password expiry: default_password_lifetime, which determines the amount of time between requiring the user to change their password. 0, the default, means automatic password expiry is not active.

    The second variable, disconnect_on_expired_password determines whether a client is permitted to connect if their password has expired, or whether they are permitted to connect in sandbox mode, able to perform a limited subset of queries related to resetting the password, in particular SET PASSWORD and SET.

    Setting a Password Expiry Limit for a User

    Besides automatic password expiry, as determined by , password expiry times can be set on an individual user basis, overriding the global using the or statements, for example:

    Limits can be disabled by use of the NEVER keyword, for example:

    A manually set limit can be restored the system default by use of DEFAULT, for example:

    Note that the limit is defined as the number of days since the last password change. And the last password change is the value of CURRENT_TIMESTAMP when the password was changed last. If the @@secure_timestamp variable is set to NO (which is its default value) any user can modify the session timestamp arbitrarily, in particular, they can pretend that the password was changed at some point in time far in the future, effectively disabling any password expiration limit. To prevent it you need to make sure the @@secure_timestamp is set or to audit password expiration limits regularly.

    SHOW CREATE USER

    The statement will display information about the password expiry status of the user. Unlike MySQL, it will not display if the user is unlocked, or if the password expiry is set to default.

    Checking When Passwords Expire

    MariaDB starting with

    From , the stores password expiry and password error information. An unprivileged user can access their own user data from the table.

    The following query can also be used to check when the current passwords expire for all users:

    --connect-expired-password Client Option

    The --connect-expired-password option notifies the server that the client is prepared to handle expired password sandbox mode (even if the --batch option was specified).

    See Also

    • video tutorial

    This page is licensed: CC BY-SA / Gnu FDL

    Enabling TLS on MariaDB Server

    Overview

    MariaDB Server and MariaDB Community Server support data-in-transit encryption, which secures data transmitted over the network. The server and the clients encrypt data using the Transport Layer Security (TLS) protocol, which is a newer version of the Secure Socket Layer (SSL) protocol.

    TLS must be manually enabled on the server.

    Enabling TLS

    1. Acquire an X509 certificate and a private key for the server. If it is a test or development server, then self-signed certificates and keys might be sufficient.

    2. Determine which and you need to configure.

    Mandatory system variables and options for TLS include:

    System Variable/Option
    Description

    Useful system variables and options for TLS include:

    System Variable/Option
    Description
    1. Choose a configuration file in which to configure your system variables and options. It is not recommended to make custom changes to one of the bundled configuration files. Instead, it is recommended to create a custom configuration file in one of the included directories. Configuration files in included directories are read in alphabetical order. If you want your custom configuration file to override the bundled configuration files, then it is a good idea to prefix the custom configuration file's name with a string that will be sorted last, such as z-.

    • On RHEL, CentOS, Rocky Linux, and SLES, a good custom configuration file would be: /etc/my.cnf.d/z-custom-my.cnf

    • On Debian and Ubuntu, a good custom configuration file would be: /etc/mysql/mariadb.conf.d/z-custom-my.cnf

    1. Set your system variables and options in the configuration file. They need to be set in a group that will be read by , such as [mariadb] or [server]. For example:

    1. Restart the server.

    1. Connect to the server using :

    1. Confirm that TLS is enabled by confirming that the have_ssl system variable is YES with the SHOW GLOBAL VARIABLES statement:

    This page is: Copyright © 2025 MariaDB. All rights reserved.

    Account Locking

    Syntax

    The lock_option and password_option clauses can occur in either order.

    Prior to and , the lock_option must be placed before the password_option.

    Description

    Account locking permits privileged administrators to lock/unlock user accounts. No new client connections will be permitted if an account is locked (existing connections are not affected).

    Locking Accounts

    User accounts can be locked at creation, with the statement, or modified after creation with the statement. For example:

    or

    The server will return an ER_ACCOUNT_HAS_BEEN_LOCKED error when locked users attempt to connect:

    Unlocking Accounts

    The statement is used to unlock a user:

    Show Whether a Specific Account is Locked

    The statement will show whether the account is locked:

    as well as querying the :

    Find Locked Accounts

    This query against the mysql.global_priv table will return all accounts which have "account_locked": true within the Priv json column:

    Example Output:

    See Also

    • video tutorial

    This page is licensed: CC BY-SA / Gnu FDL

    SELinux

    Secure MariaDB Server with SELinux. This section guides you through configuring SELinux policies to enhance the security posture of your MariaDB deployments on Linux systems.

    is a Linux kernel module that provides a framework for configuring system for many resources on the system. It is enabled by default on some Linux distributions, including RHEL, CentOS, Fedora, and other similar Linux distribution. SELinux prevents programs from accessing files, directories or ports unless it is configured to access those resources.

    Verifying Whether SELinux Is Enabled

    To verify whether SELinux is enabled, execute the command. For example:

    InnoDB Encryption Overview

    MariaDB supports data-at-rest encryption for tables using the storage engines. When enabled, the server encrypts data when it writes it to and decrypts data when it reads it from the file system. You can to automatically have all new InnoDB tables automatically encrypted, or specify encrypt per table.

    For encrypting data with the Aria storage engine, see .

    Basic Configuration

    Using data-at-rest encryption requires that you first configure an plugin, such as the or plugins. MariaDB uses this plugin to store, retrieve and manage the various keys it uses when encrypting data to and decrypting data from the file system.

    Once you have the plugin configured, you need to set a few additional system variables to enable encryption on InnoDB tables, including

    Roles Overview

    Description

    A role bundles a number of privileges together. It assists larger organizations where, typically, a number of users would have the same privileges, and, previously, the only way to change the privileges for a group of users was by changing each user's privileges individually.

    Alternatively, multiple external users could have been assigned the same user, and there would have been no way to see which actual user was responsible for which action.

    With roles, managing this is easy. For example, there could be a number of users assigned to a journalist role, with identical privileges. Changing the privileges for all the journalists is a matter of simply changing the role's privileges, while the individual user is still linked with any changes that take place.

    Roles are created with the statement, and dropped with the statement. Roles are then assigned to a user with an extension to the

    Limiting Size of Created Disk Temporary Files and Tables Overview

    MariaDB starting with

    From , it's possible to limit the size of created disk temporary files and tables. When the internal in-memory temporary table is oversize and converting to MyISAM/Aria table to store on disk, this option will limit the max space of tmp_dir. If a new disk temporary table will cause tmp_dir over the limitation, then this query will return an error.

    Temporary Space

    The temporary space includes:

    [mariadb]
    ...
    ssl_cert = /certs/server-cert.pem
    ssl_key = /certs/server-key.pem
    ssl_ca = /certs/ca-cert.pem
    $ sudo systemctl restart mariadb
    $ sudo mariadb
    SHOW GLOBAL VARIABLES LIKE 'have_ssl';
    
    +---------------+-------+
    | Variable_name | Value |
    +---------------+-------+
    | have_ssl      | YES   |
    +---------------+-------+
     CREATE USER [...]
     [lock_option] [password_option] 
     
     ALTER USER [...]
     [lock_option] [password_option] 
    require_secure_transport
    ssl_cert
    ssl_key
    ssl_ca
    ssl_capath
    ssl_cipher
    ssl_crl
    ssl_crlpath
    tls_version
    innodb_encryption_rotate_key_age
    innodb_encrypt_tables
    system
    file-per-table
    ENCRYPTED
    innodb_encrypt_tables
    system
    file-per-table
    innodb_encryption_rotation_iops
    innodb_encrypt_tables
    innodb_encryption_threads
    innodb_encryption_rotate_key_age
    disabling key rotations
    file-per-table
    ALTER TABLE
    ENCRYPTED
    ALTER TABLE
    ENCRYPTED
    file-per-table
    ALTER TABLE
    innodb_encryption_threads
    innodb_rotate_key_age
    system
    ALTER TABLE
    system
    innodb_encrypt_tables
    system
    innodb_encryption_threads
    innodb_system_rotate_key_age
    MDEV-14398
    INNODB_TABLESPACES_ENCRYPTION
    information_schema
    COUNT()
    INNODB_SYS_TABLESPACES
    information_schema

    ssl_cert

    X509 cert in PEM format

    ssl_key

    X509 key in PEM format

    ssl_ca

    JCA file in PEM format

    require_secure_transport

    When this option is enabled, connections attempted using insecure transport will be rejected. Secure transports are SSL/TLS, Unix sockets, or named pipes.

    ssl_capath

    CA directory

    ssl_cipher

    SSL cipher to use

    ssl_crl

    CRL file in PEM format

    ssl_crlpath

    CRL directory

    tls_version

    TLS protocol version for secure connections.

    system variables
    options
    MariaDB Server
    MariaDB Client
    Temporarily Putting mysqld Into Permissive Mode

    When you are troubleshooting issues that you think SELinux might be causing, it can help to temporarily put mysqld_t into permissive mode. This can be done by executing the semanage command. For example:

    If that solved the problem, then it means that the current SELinux policy is the culprit. You need to adjust the SELinux policy or labels for MariaDB.

    Configuring a MariaDB Server SELinux Policy

    MariaDB Server should work with your default distribution policy (which is usually part of the selinux-policy or selinux-policy-targeted system package). If you use mysqld_safe, you will need an additional policy file, mariadb.pp, which is installed together with the MariaDB Server. It will be loaded automatically if you have /usr/sbin/semodule installed, but you can load it manually anytime with

    Note that this policy file extends, but not replaces the system policy.

    Setting File Contexts

    SELinux uses file contexts as a way to determine who should be able to access that file.

    File contexts are managed with the semanage fcontext and restorecon commands.

    On many systems, the semanage utility is installed by the policycoreutils-python package, and the restorecon utility is installed by the policycoreutils package. You can install these with the following command:

    A file or directory's current context can be checked by executing ls with the --context or --scontext options.

    Setting the File Context for the Data Directory

    If you use a custom directory for datadir, then you may need to set the file context for that directory. The SELinux file context for MariaDB data files is mysqld_db_t. You can determine if this file context is present on your system and which files or directories it is associated with by executing the following command:

    If you would like to set the file context for your custom directory for your datadir, then that can be done by executing the semanage fcontext and restorecon commands. For example:

    If you would like to check the current file context, you can do so by executing ls with the --context or --scontext options. For example:

    Setting the File Context for Log Files

    If you use a custom directory for log files, then you may need to set the file context for that directory. The SELinux file context for MariaDB log files is mysqld_log_t. You can determine if this file context is present on your system and which files or directories it is associated with by executing the following command:

    If you would like to set the file context for your custom directory for log files, then that can be done by executing the semanage fcontext and restorecon commands. For example:

    If you would like to check the current file context, you can do so by executing ls with the --context or --scontext options. For example:

    Setting the File Context for Option Files

    If you use a custom directory for option files, then you may need to set the file context for that directory. The SELinux file context for MariaDB option files is mysqld_etc_t. You can determine if this file context is present on your system and which files or directories it is associated with by executing the following command:

    If you would like to set the file context for your custom directory for option files, then that can be done by executing the semanage fcontext and restorecon commands. For example:

    If you would like to check the current file context, you can do so by executing ls with the --context or --scontext options. For example:

    Setting the Unix Socket

    A custom location for the socket means it needs to have the right file context of mysqld_var_run_t for permitted application to connect to the socket.

    A newly created socket with get the right context.

    Allowing Access to the Tmpfs File Context

    If you wanted to mount your tmpdir on a tmpfs file system or wanted to use a tmpfs file system on /run/shm, then you might need to allow mysqld_t to have access to a couple tmpfs-related file contexts. For example:

    Troubleshooting SELinux Issues

    You might need to troubleshoot SELinux-related issues in cases, such as:

    • MariaDB is using a non-default port.

    • MariaDB is reading from or writing to some files (datadir, log files, option files, etc.) located at non-default paths.

    • MariaDB is using a plugin that requires access to resources that default installations do not use.

    File System Permission Errors

    If the file system permissions for some MariaDB directory look fine, but the MariaDB error log still has errors that look similar to the following:

    Then check SELinux's /var/log/audit/audit.log for log entries that look similar to the following:

    If you see any entries that look similar to this, then you most likely need to adjust the file contexts for some files or directories. See Setting File Contexts for more information on how to do that.

    SELinux and MariaDB On a Different Port

    TCP and UDP ports are enabled for permission to bind too. If you are using a different port, or some Galera ports, configure SELinux to be able to use those ports:

    Generating SELinux Policies with audit2allow

    In some cases, a MariaDB system might need non-standard policies. It is possible to create these policies from the SELinux audit log using the audit2allow utility. The semanage and semodule utilities will also be needed.

    On many systems, the audit2allow and semanage utilities are installed by the policycoreutils-python package, and the semodule utility is installed by the policycoreutils package. You can install these with the following command:

    The following process can be used to generate a policy from the audit log:

    • Remove dontaudits from the policy:

    • Temporarily put mysqld_t into permissive mode. For example:

    • Start MariaDB.

    • Do whatever was causing SELinux errors.

    • Use the generated audit log to create a policy:

    • Pull mysqld_t out of permissive mode. For example:

    • Restore dontaudits for the policy:

    The same procedure can be used if MariaDB starts but SELinux prevents it from functioning correctly. For example, SELinux may prevent PAM plugin from authenticating users. The solution is the same — enable auditing, switch to permissive, do, whatever SELinux didn't allow you to, create a policy from the audit log.

    When you discover any needed SELinux permissions, please report the needed permissions to your operating system bug tracking so all users can benefit from your work (e.g. Red Hat Bugzilla).

    This page is licensed: CC BY-SA / Gnu FDL

    Security-Enhanced Linux (SELinux)
    mandatory access control (MAC)
    getenforce
    ,
    ,
    ,
    and
    .

    For more information on system variables for encryption and other features, see the InnoDB system variables page.

    Creating Encrypted Tables

    To create encrypted tables, specify the table options ENCRYPTED=YES and ENCRYPTION_KEY_ID= with a corresponding key id;

    Finding Encrypted Tables

    When using data-at-rest encryption with the InnoDB storage engine, it is not necessary that you encrypt every table in your database. You can check which tables are encrypted and which are not by querying the INNODB_TABLESPACES_ENCRYPTION table in the Information Schema. This table provides information on which tablespaces are encrypted, which encryption key each tablespace is encrypted with, and whether the background encryption threads are currently working on the tablespace. Since the system tablespace can also contain tables, it can be helpful to join the INNODB_TABLESPACES_ENCRYPTION table with the INNODB_SYS_TABLES table to find out the encryption status of each specific table, rather than each tablespace. For example:

    Redo Logs

    Using data-at-rest encryption with InnoDB, the innodb_encrypt_tables system variable only encrypts the InnoDB tablespaces. In order to also encrypt the InnoDB Redo Logs, you also need to set the innodb_encrypt_log system variable.

    Where the encryption key management plugin supports key rotation, the InnoDB Redo Log can also rotate encryption keys. In previous releases, the Redo Log can only use the first encryption key.

    See Also

    • Data at Rest Encryption

    • Why Encrypt MariaDB Data?

    • Encryption Key Management

    • Information Schema INNODB_TABLESPACES_ENCRYPTION table

    This page is licensed: CC BY-SA / Gnu FDL

    InnoDB
    configure InnoDB encryption
    Encrypting Data for Aria
    Encryption Key Management
    file_key_management
    aws_key_management
    innodb_encrypt_tables
    innodb_encrypt_log
    innodb_encryption_threads
    innodb_encrypt_temporary_tables
    innodb_encryption_rotate_key_age
    statement, while privileges are assigned to a role in the regular way with
    . Similarly, the
    statement can be used to both revoke a role from a user, or revoke a privilege from a role.

    Once a user has connected, he can obtain all privileges associated with a role by setting a role with the SET ROLE statement. The CURRENT_ROLE function returns the currently set role for the session, if any.

    Only roles granted directly to a user can be set, roles granted to other roles cannot. Instead the privileges granted to a role, which is, in turn, granted to another role (grantee), will be immediately available to any user who sets this second grantee role.

    The SET DEFAULT ROLE statement allows one to set a default role for a user. A default role is automatically enabled when a user connects (an implicit SET ROLE statement is executed immediately after a connection is established).

    Roles were implemented as a GSoC 2013 project by Vicentiu Ciorbaru.

    System Tables

    Information about roles and who they've been granted to can be found in the Information Schema APPLICABLE_ROLES table as well as the mysql.ROLES_MAPPING table.

    The Information Schema ENABLED_ROLES table shows the enabled roles for the current session.

    Examples

    Creating a role and granting a privilege:

    Note, that hulda has no SHOW DATABASES privilege, even though she was granted the journalist role. She needs to set the role first:

    Roles can be granted to roles:

    But one does not need to set a role granted to a role. For example, hulda will automatically get all writer privileges when she sets the journalist role:

    Roles and Views (and Stored Routines)

    When a user sets a role, he, in a sense, has two identities with two associated sets of privileges. But a view (or a stored routine) can have only one definer. So, when a view (or a stored routine) is created with the SQL SECURITY DEFINER, one can specify whether the definer should be CURRENT_USER (and the view will have none of the privileges of the user's role) or CURRENT_ROLE (in this case, the view will use role's privileges, but none of the user's privileges). As a result, sometimes one can create a view that is impossible to use.

    Other Resources

    • Roles Review by Peter Gulutzan

    This page is licensed: CC BY-SA / Gnu FDL

    CREATE ROLE
    DROP ROLE
    GRANT
    GRANT
    REVOKE
    SELECT SPACE, NAME
    FROM information_schema.INNODB_TABLESPACES_ENCRYPTION
    WHERE ROTATING_OR_FLUSHING = 1;
    SELECT COUNT(*) AS 'encrypting' 
    FROM information_schema.INNODB_TABLESPACES_ENCRYPTION
    WHERE ROTATING_OR_FLUSHING = 1;
    /* information_schema.INNODB_TABLESPACES_ENCRYPTION does not always have rows for all tablespaces,
      so let's join it with information_schema.INNODB_SYS_TABLESPACES */
    WITH tablespace_ids AS (
       SELECT SPACE
       FROM information_schema.INNODB_SYS_TABLESPACES ist
       UNION
       /* information_schema.INNODB_SYS_TABLESPACES doesn't have a row for the system tablespace (MDEV-20802) */
       SELECT 0 AS SPACE
    )
    SELECT NOW() AS 'time', 
       'tablespaces', COUNT(*) AS 'tablespaces', 
       'encrypted', SUM(IF(ite.ENCRYPTION_SCHEME IS NOT NULL, ite.ENCRYPTION_SCHEME, 0)) AS 'encrypted', 
       'encrypting', SUM(IF(ite.ROTATING_OR_FLUSHING IS NOT NULL, ite.ROTATING_OR_FLUSHING, 0)) AS 'encrypting'
    FROM tablespace_ids
    LEFT JOIN information_schema.INNODB_TABLESPACES_ENCRYPTION ite
       ON tablespace_ids.SPACE = ite.SPACE
    [mariadb]
    ...
    ssl_cert = /certs/server-cert.pem
    ssl_key = /certs/server-key.pem
    ssl_ca = /certs/ca-cert.pem
    $ sudo systemctl restart mariadb
    $ sudo mariadb
    SHOW GLOBAL VARIABLES LIKE 'have_ssl';
    
    +---------------+-------+
    | Variable_name | Value |
    +---------------+-------+
    | have_ssl      | YES   |
    +---------------+-------+
    getenforce
    sudo semanage permissive -a mysqld_t
    /usr/sbin/semodule -i /usr/share/mysql/policy/selinux/mariadb.pp
    sudo yum install policycoreutils policycoreutils-python
    sudo semanage fcontext --list | grep mysqld_db_t
    sudo semanage fcontext -a -t mysqld_db_t "/mariadb/data(/.*)?"
    sudo restorecon -Rv /mariadb/data
    ls --directory --scontext /mariadb/data
    sudo semanage fcontext --list | grep mysqld_log_t
    sudo semanage fcontext -a -t mysqld_log_t "/var/log/mysql(/.*)?"
    sudo restorecon -Rv /var/log/mysql
    ls --directory --scontext /var/log/mysql
    sudo semanage fcontext --list | grep mysqld_etc_t
    sudo semanage fcontext -a -t mysqld_etc_t "/etc/mariadb(/.*)?"
    sudo restorecon -Rv /etc/mariadb
    ls --directory --scontext /etc/mariadb
    sudo semanage fcontext -a -t mysqld_var_run_t "/mariadb/run/mariadb.sock"
    cd /usr/share/mysql/policy/selinux/
    tee ./mysqld_tmpfs.te <<EOF
    module mysqld_tmpfs 1.0;
    
    require {
    type tmpfs_t;
    type mysqld_t;
    class dir { write search read remove_name open getattr add_name };
    class file { write getattr read lock create unlink open };
    }
    
    allow mysqld_t tmpfs_t:dir { write search read remove_name open getattr add_name };
    
    allow mysqld_t tmpfs_t:file { write getattr read lock create unlink open }
    EOF
    sudo checkmodule -M -m mysqld_tmpfs.te -o mysqld_tmpfs.mod
    sudo semodule_package -m mysqld_tmpfs.mod -o mysqld_tmpfs.pp 
    sudo semodule -i mysqld_tmpfs.pp
    130321 11:50:51 mysqld_safe Starting mysqld daemon with databases from /datadir
    ...
    2013-03-21 11:50:52 2119 [Warning] Can't create test file /datadir/
    2013-03-21 11:50:52 2119 [Warning] Can't create test file /datadir/
    ...
    2013-03-21 11:50:52 2119 [ERROR] /usr/sbin/mysqld: Can't create/write to file 
        '/datadir/boxy.pid' (Errcode: 13 - Permission denied)
    2013-03-21 11:50:52 2119 [ERROR] Can't start server: can't create PID file: 
        Permission denied
    130321 11:50:52 mysqld_safe mysqld from pid file /datadir/boxy.pid ended
    type=AVC msg=audit(1363866652.030:24): avc:  denied  { write } for  pid=2119 
        comm="mysqld" name="datadir" dev=dm-0 ino=394 
        scontext=unconfined_u:system_r:mysqld_t:s0 
        tcontext=unconfined_u:object_r:default_t:s0 tclass=dir
    sudo semanage port -a -t mysqld_port_t -p tcp 3307
    sudo yum install policycoreutils policycoreutils-python
    sudo semodule -DB
    sudo semanage permissive -a mysqld_t
    sudo grep mysqld /var/log/audit/audit.log | audit2allow -M mariadb_local
    sudo semodule -i mariadb_local.pp
    sudo semanage permissive -d mysqld_t
    sudo setmodule -B
    [mariadb]
    ...
    
    # File Key Management
    plugin_load_add = file_key_management
    file_key_management_filename = /etc/mysql/encryption/keyfile.enc
    file_key_management_filekey = FILE:/etc/mysql/encryption/keyfile.key
    file_key_management_encryption_algorithm = AES_CTR
    
    # InnoDB Encryption
    innodb_encrypt_tables = ON
    innodb_encrypt_temporary_tables = ON
    innodb_encrypt_log = ON
    innodb_encryption_threads = 4
    innodb_encryption_rotate_key_age = 1
    CREATE TABLE t (i INT PRIMARY KEY) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=2;
    SELECT st.SPACE, st.NAME, te.ENCRYPTION_SCHEME, te.ROTATING_OR_FLUSHING
    FROM information_schema.INNODB_TABLESPACES_ENCRYPTION te
    JOIN information_schema.INNODB_SYS_TABLES st
       ON te.SPACE = st.SPACE \G
    *************************** 1. row ***************************
                   SPACE: 0
                    NAME: SYS_DATAFILES
       ENCRYPTION_SCHEME: 1
    ROTATING_OR_FLUSHING: 0
    *************************** 2. row ***************************
                   SPACE: 0
                    NAME: SYS_FOREIGN
       ENCRYPTION_SCHEME: 1
    ROTATING_OR_FLUSHING: 0
    *************************** 3. row ***************************
                   SPACE: 0
                    NAME: SYS_FOREIGN_COLS
       ENCRYPTION_SCHEME: 1
    ROTATING_OR_FLUSHING: 0
    *************************** 4. row ***************************
                   SPACE: 0
                    NAME: SYS_TABLESPACES
       ENCRYPTION_SCHEME: 1
    ROTATING_OR_FLUSHING: 0
    *************************** 5. row ***************************
                   SPACE: 0
                    NAME: SYS_VIRTUAL
       ENCRYPTION_SCHEME: 1
    ROTATING_OR_FLUSHING: 0
    *************************** 6. row ***************************
                   SPACE: 0
                    NAME: db1/default_encrypted_tab1
       ENCRYPTION_SCHEME: 1
    ROTATING_OR_FLUSHING: 0
    *************************** 7. row ***************************
                   SPACE: 416
                    NAME: db1/default_encrypted_tab2
       ENCRYPTION_SCHEME: 1
    ROTATING_OR_FLUSHING: 0
    *************************** 8. row ***************************
                   SPACE: 402
                    NAME: db1/tab
       ENCRYPTION_SCHEME: 1
    ROTATING_OR_FLUSHING: 0
    *************************** 9. row ***************************
                   SPACE: 185
                    NAME: db1/tab1
       ENCRYPTION_SCHEME: 1
    ROTATING_OR_FLUSHING: 0
    *************************** 10. row ***************************
                   SPACE: 184
                    NAME: db1/tab2
       ENCRYPTION_SCHEME: 1
    ROTATING_OR_FLUSHING: 0
    *************************** 11. row ***************************
                   SPACE: 414
                    NAME: db1/testgb2
       ENCRYPTION_SCHEME: 1
    ROTATING_OR_FLUSHING: 0
    *************************** 12. row ***************************
                   SPACE: 4
                    NAME: mysql/gtid_slave_pos
       ENCRYPTION_SCHEME: 1
    ROTATING_OR_FLUSHING: 0
    *************************** 13. row ***************************
                   SPACE: 2
                    NAME: mysql/innodb_index_stats
       ENCRYPTION_SCHEME: 1
    ROTATING_OR_FLUSHING: 0
    *************************** 14. row ***************************
                   SPACE: 1
                    NAME: mysql/innodb_table_stats
       ENCRYPTION_SCHEME: 1
    ROTATING_OR_FLUSHING: 0
    *************************** 15. row ***************************
                   SPACE: 3
                    NAME: mysql/transaction_registry
       ENCRYPTION_SCHEME: 1
    ROTATING_OR_FLUSHING: 0
    15 rows in set (0.000 sec)
    CREATE ROLE journalist;
    
    GRANT SHOW DATABASES ON *.* TO journalist;
    
    GRANT journalist TO hulda;
    SHOW DATABASES;
    +--------------------+
    | Database           |
    +--------------------+
    | information_schema |
    +--------------------+
    
    SELECT CURRENT_ROLE;
    +--------------+
    | CURRENT_ROLE |
    +--------------+
    | NULL         |
    +--------------+
    
    SET ROLE journalist;
    
    SELECT CURRENT_ROLE;
    +--------------+
    | CURRENT_ROLE |
    +--------------+
    | journalist   |
    +--------------+
    
    SHOW DATABASES;
    +--------------------+
    | Database           |
    +--------------------+
    | ...                |
    | information_schema |
    | mysql              |
    | performance_schema |
    | test               |
    | ...                |
    +--------------------+
    
    SET ROLE NONE;
    CREATE ROLE writer;
    
    GRANT SELECT ON data.* TO writer;
    
    GRANT writer TO journalist;
    SELECT CURRENT_ROLE;
    +--------------+
    | CURRENT_ROLE |
    +--------------+
    | NULL         |
    +--------------+
    
    SHOW TABLES FROM data;
    Empty set (0.01 sec)
    
    SET ROLE journalist;
    
    SELECT CURRENT_ROLE;
    +--------------+
    | CURRENT_ROLE |
    +--------------+
    | journalist   |
    +--------------+
    
    SHOW TABLES FROM data;
    +------------------------------+
    | Tables_in_data               |
    +------------------------------+
    | set1                         |
    | ...                          |
    +------------------------------+
    CREATE ROLE r1;
    
    GRANT ALL ON db1.* TO r1;
    
    GRANT r1 TO foo@localhost;
    
    GRANT ALL ON db.* TO foo@localhost;
    
    SELECT CURRENT_USER
    +---------------+
    | current_user  |
    +---------------+
    | foo@localhost |
    +---------------+
    
    SET ROLE r1;
    
    CREATE TABLE db1.t1 (i INT);
    
    CREATE VIEW db.v1 AS SELECT * FROM db1.t1;
    
    SHOW CREATE VIEW db.v1;
    +------+------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
    | View | Create View                                                                                                                              | character_set_client | collation_connection |
    +------+------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
    | v1   | CREATE ALGORITHM=UNDEFINED DEFINER=`foo`@`localhost` SQL SECURITY DEFINER VIEW `db`.`v1` AS SELECT `db1`.`t1`.`i` AS `i` from `db1`.`t1` | utf8                 | utf8_general_ci      |
    +------+------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
    
    CREATE DEFINER=CURRENT_ROLE VIEW db.v2 AS SELECT * FROM db1.t1;
    
    SHOW CREATE VIEW db.b2;
    +------+-----------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
    | View | Create View                                                                                                                 | character_set_client | collation_connection |
    +------+-----------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
    | v2   | CREATE ALGORITHM=UNDEFINED DEFINER=`r1` SQL SECURITY DEFINER VIEW `db`.`v2` AS select `db1`.`t1`.`a` AS `a` from `db1`.`t1` | utf8                 | utf8_general_ci      |
    +------+-----------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
    All SQL level temporary files. This includes files for filesort, transaction temporary space, analyze, binlog_stmt_cache etc. It does not include engine internal temporary files used for repair, alter table, index pre sorting etc.
  • All internal on disk temporary tables created as part of resolving a SELECT, multi-source update etc.

  • Special Cases

    • When doing a commit, the last flush of the binlog_stmt_cache will not cause an error even if the temporary space limit is exceeded. This is to avoid giving errors on commit. This means that a user can temporary go over the limit with up to binlog_stmt_cache_size.

    System Variables

    There are two system variables used for controlling this feature:

    • max_tmp_session_space_usage: Limits the temporary space allowance per user

    • max_tmp_total_space_usage: Limits the temporary space allowance for all users.

    Status Variables

    • tmp_space_used

    • max_tmp_space_used

    Information Schema

    • New field in information_schema.process_list: TMP_SPACE_USED

    Noteworthy issue

    • One has to be careful when using small values for max_tmp_space limit together with binary logging and with non transactional tables.

    • If a binary log entry for the query is larger than binlog_stmt_cache_size and one hits the limit of max_tmp_space when flushing the entry to disk, the query will abort and the binary log will not contain the last changes to the table. This will also stop the replica!

    • This is also true for all Aria tables as Aria cannot do rollback (except in case of crashes)!

    • One way to avoid it is to use @@binlog_format=statement for queries that update many lot of rows.

    Implementation

    • All writes to temporary files or internal temporary tables, that increase the file size, are routed through temp_file_size_cb_func() which updates and checks the temp space usage.

    • Most of the temporary file monitoring is done inside IO_CACHE. Temporary file monitoring is done inside the Aria engine.

    • MY_TRACK and MY_TRACK_WITH_LIMIT are new flags for ini_io_cache(). MY_TRACK means that we track the file usage. TRACK_WITH_LIMIT means that we track the file usage and we give an error if the limit is breached. This is used to not give an error on commit when binlog_stmt_cache is flushed.

    • global_tmp_space_used contains the total tmp space used so far. This is needed quickly check against max_total_tmp_space_usage.

    • Temporary space errors are using EE_LOCAL_TMP_SPACE_FULL and handler errors are using HA_ERR_LOCAL_TMP_SPACE_FULL. This is needed until we move general errors to it's own error space so that they cannot conflict with system error numbers.

    • Return value of my_chsize() and mysql_file_chsize() has changed so that -1 is returned in the case my_chsize() could not decrease the file size (very unlikely and will not happen on modern systems). All calls to _chsize() are updated to check for > 0 as the error condition.

    • At the destruction of THD we check that THD::tmp_file_space == 0

    • At server end we check that global_tmp_space_used == 0

    • As a precaution against errors in the tmp_space_used code, one can set max_tmp_space_usage and max_total_tmp_space_usage to 0 to disable the tmp space quota errors.

    • truncate_io_cache() function added.

    • Aria tables using static or dynamic row length are registered in 8K increments to avoid some calls to update_tmp_file_size().

    See Also

    • MDEV-9101 - Limit size of created disk temporary files and tables

    This page is licensed: CC BY-SA / Gnu FDL

    File-based key management

    Supported

    Supported from MariaDB Enterprise Server 11.8

    Simple but lacks rotation

    HashiCorp Vault plugin

    Supported, Recommended

    Yes

    Best for secure, scalable deployments

    File Key Management Plugin
    Hashicorp Key Management Plugin
    AWS SDK for C++
    Apache License, Version 2.0
    AWS Key Management Plugin
    data-at-rest encryption
    encrypting InnoDB tables
    can be changed
    encrypting Aria tables
    cannot currently be changed
    InnoDB storage engine
    background encryption threads
    automatically re-encrypt pages when key rotations occur
    Aria storage engine
    not currently have a similar mechanism to re-encrypt pages in the background when key rotations occur
    AWS Key Management Service (KMS)
    AWS Key Management Plugin
    Hashicorp Key Management Plugin
    File Key Management Plugin
    default_password_lifetime
    CREATE USER
    ALTER USER
    SHOW CREATE USER
    Information Schema USERS table
    mariadb client
    Account Locking and Password Expiry
    CREATE USER
    ALTER USER
    ALTER USER
    SHOW CREATE USER
    mysql.global_priv table
    Account Locking and Password Expiry

    Data-at-Rest Encryption Overview

    Overview

    Having tables encrypted makes it almost impossible for someone to access or steal a hard disk and get access to the original data. This functionality is also known as Transparent Data Encryption (TDE).

    All of the following assumes that encryption keys are stored on another system.

    Using encryption has an overhead of roughly 3-5%.

    Which Storage Engines Does MariaDB Encryption Support?

    MariaDB encryption is fully supported for the storage engines. Encryption is also supported for the Aria storage engine, but only for tables created with ROW_FORMAT=PAGE (the default), and for the binary log (replication log).

    MariaDB allows the user to configure flexibly what to encrypt. In or InnoDB, one can choose to encrypt:

    • everything — all tablespaces (with all tables) (with )

    • individual tables

    • everything, excluding individual tables

    Additionally, one can choose to encrypt InnoDB log files (recommended, with ) and InnoDB Temporary Tables (with ).

    When or an encryption key of 1 must be defined. See .

    Limitations

    These limitations exist in the data-at-rest encryption implementation:

    • Only data and only at rest is encrypted. Metadata (for example .frm files) and data sent to the client are not encrypted (but see ).

    • Only the MariaDB server knows how to decrypt the data, in particular

      • can read encrypted binary logs only when --read-from-remote-server is used ().

    Encryption Key Management

    MariaDB's data-at-rest encryption requires the use of a . These plugins are responsible both for the management of encryption keys and for the actual encryption and decryption of data.

    MariaDB supports the use of . Each encryption key uses a 32-bit integer as a key identifier. If the specific plugin supports , then encryption keys can also be rotated, which creates a new version of the encryption key.

    How MariaDB manages encryption keys depends on which encryption key management solution you choose. Currently, MariaDB has three options:

    Once you have an key management and encryption plugin set up and configured for your server, you can begin using encryption options to better secure your data.

    Encrypting Data

    Encryption occurs whenever MariaDB writes pages to disk. Encrypting table data requires that you install a , such as the plugin. Once you have a plugin set up and configured, you can enable encryption for your InnoDB and Aria tables.

    Encrypting Table Data

    MariaDB supports data-at-rest encryption for InnoDB and Aria storage engines. Additionally, it supports encrypting the and internal on-disk temporary tables that use the Aria storage engine..

    Encrypting Temporary Files

    MariaDB also creates temporary files on disk. For example, a binary log cache will be written to a temporary file if the binary log cache exceeds or , and temporary files are also often used for filesorts during query execution. These temporary files can also be encrypted if is set.

    Temporary files created internally by InnoDB, such as those used for merge sorts and row logs can also be encrypted if is set. These files are encrypted regardless of whether the tables involved are encrypted or not, and regardless of whether is set or not.

    Encrypting Binary Logs

    MariaDB can also encrypt (including ).

    Encryption and Page Compression

    Data-at-rest encryption and can be used together. When they are used together, data is first compressed, and then it is encrypted. In this case you save space and still have your data protected.

    Thanks

    • Tablespace encryption was donated to the MariaDB project by Google.

    We are grateful to these companies for their support of MariaDB!

    See Also

    • A with benchmark results

    This page is licensed: CC BY-SA / Gnu FDL

    Disabling InnoDB Encryption

    The process involved in safely disabling encryption for your InnoDB tables is a little more complicated than that of enabling encryption. Turning off the relevant system variables doesn't decrypt the tables. If you turn it off and remove the encryption key management plugin, it'll render the encrypted data inaccessible.

    In order to safely disable encryption, you first need to decrypt the tablespaces and the Redo Log, then turn off the system variables. The specifics of this process depends on whether you are using automatic or manual encryption of the InnoDB tablespaces.

    Disabling Encryption for Automatically Encrypted Tablespaces

    When an InnoDB tablespace has the ENCRYPTED table option set to DEFAULT and the innodb_encrypt_tables system variable is set to ON or FORCE, the tablespace's encryption is automatically managed by the background encryption threads. When you want to disable encryption for these tablespaces, you must ensure that the background encryption threads decrypt the tablespaces before removing the encryption keys. Otherwise, the tablespace remains encrypted and becomes inaccessible once you've removed the keys.

    To safely decrypt the tablespaces, first, set the system variable to OFF:

    Next, set the system variable to a non-zero value:

    Then, set the system variable to 1:

    Once set, any InnoDB tablespaces that have the table option set to DEFAULT will be in the background by the InnoDB .

    Decryption Status

    You can of the decryption process using the table in the database.

    This query shows the number of InnoDB tablespaces that currently using background encryption threads. Once the count reaches 0, then all of your InnoDB tablespaces are unencrypted. Be sure to also remove encryption on the and the storage engine before removing the encryption key management settings from your configuration file.

    Disabling Encryption for Manually Encrypted Tablespaces

    In the case of manually encrypted InnoDB tablespaces, (that is, those where the table option is set to YES), you must issue an statement to decrypt each tablespace before removing the encryption keys. Otherwise, the tablespace remains encrypted and becomes inaccessible without the keys.

    First, query the Information Schema table to find the encrypted tables. This can be done with a WHERE clause filtering the CREATE_OPTIONS column.

    For each table in the result-set, issue an statement, setting the table option to NO.

    Once you have removed encryption from all the tables, your InnoDB deployment is unencrypted. Be sure to also remove encryption from the as well as and any other storage engines that support encryption before removing the encryption key management settings from your configuration file.

    InnoDB does not permit manual encryption changes to tables in the tablespace using . Encryption of the tablespace can only be configured by setting the value of the system variable. This means that when you want to encrypt or decrypt the tablespace, you must also set a non-zero value for the system variable, and you must also set the system variable to 1 to ensure that the system tablespace is properly encrypted or decrypted by the background threads. See for more information.

    Disabling Encryption for Temporary Tablespaces

    The system variable controls the configuration of encryption for the . To disable it, remove the system variable from your server's , and then restart the server.

    Disabling Encryption for the Redo Log

    InnoDB uses the in crash recovery. By default, these events are written to file in an unencrypted state. In removing data-at-rest encryption for InnoDB, be sure to also disable encryption for the Redo Log before removing encryption key settings. Otherwise the Redo Log can become inaccessible without the encryption keys.

    First, set the system variable to OFF in a server in an . Once this is done, restart the MariaDB Server. When the Server comes back online, it begins writing unencrypted data to the Redo Log.

    After the server has been successfully restarted with encryption disabled, you may remove the that had been used. If you try to disable encryption for the Redo Log and remove the plugin in a single step, InnoDB will be unable to decrypt the log in order to remove the encryption.

    See Also

    This page is licensed: CC BY-SA / Gnu FDL

    Replication with Secure Connections

    The terms master and slave have historically been used in replication, and MariaDB has begun the process of adding primary and replica synonyms. The old terms will continue to be used to maintain backward compatibility - see to follow progress on this effort.

    By default, MariaDB replicates data between primaries and replicas without encrypting it. This is generally acceptable when the primary and replica run are in networks where security is guaranteed through other means. However, in cases where the primary and replica exist on separate networks or they are in a high-risk network, the lack of encryption does introduce security concerns as a malicious actor could potentially eavesdrop on the traffic as it is sent over the network between them.

    To mitigate this concern, MariaDB allows you to encrypt replicated data in transit between primaries and replicas using the Transport Layer Security (TLS) protocol. TLS was formerly known as Secure Socket Layer (SSL), but strictly speaking the SSL protocol is a predecessor to TLS and, that version of the protocol is now considered insecure. The documentation still uses the term SSL often and for compatibility reasons TLS-related server system and status variables still use the prefix

    InnoDB Encryption Keys

    InnoDB uses plugins to support the use of multiple .

    Encryption Keys

    Each encryption key has a 32-bit integer that serves as a key identifier.

    The default key is set using the system variable.

    Encryption keys can also be specified with the table option for tables that use tablespaces.

    InnoDB encrypts the using the encryption key with the ID 1

    InnoDB Encryption Troubleshooting

    Wrong Create Options

    With InnoDB tables using encryption, there are several cases where a or statement can throw Error 1005, due to the InnoDB error 140, Wrong create options. For instance,

    When this occurs, you can usually get more information about the cause of the error by following it with a statement.

    This error is known to occur in the following cases:

    Hashicorp Key Management Plugin

    Key Rotation and Cache Flushing

    As of MariaDB 12.3, you can manually rotate keys and flush the cache without restarting the server. See for details.

    The Hashicorp Key Management Pugin is used to implement encryption using keys stored in the Hashicorp Vault KMS. For more information, see , and for how to install Vault, see , as well as .

    The current version of this plugin implements the following features:

    Encrypting Binary Logs

    MariaDB Server can encrypt the server's and . This ensures that your binary logs are only accessible through MariaDB.

    Basic Configuration

    Since , MariaDB can also encrypt (including ). Encryption of binary logs is configured by the system variable.

    Users of data-at-rest encryption will also need to have a configured. Some examples are the and .

    CREATE USER 'monty'@'localhost' PASSWORD EXPIRE INTERVAL 120 DAY;
    ALTER USER 'monty'@'localhost' PASSWORD EXPIRE INTERVAL 120 DAY;
    CREATE USER 'monty'@'localhost' PASSWORD EXPIRE NEVER;
    ALTER USER 'monty'@'localhost' PASSWORD EXPIRE NEVER;
    CREATE USER 'monty'@'localhost' PASSWORD EXPIRE DEFAULT;
    ALTER USER 'monty'@'localhost' PASSWORD EXPIRE DEFAULT;
    CREATE USER 'monty'@'localhost' PASSWORD EXPIRE INTERVAL 120 DAY;
    CREATE USER 'konstantin'@'localhost' PASSWORD EXPIRE NEVER;
    CREATE USER 'amse'@'localhost' PASSWORD EXPIRE DEFAULT;
    
    SHOW CREATE USER 'monty'@'localhost';
    +------------------------------------------------------------------+
    | CREATE USER for monty@localhost                                  |
    +------------------------------------------------------------------+
    | CREATE USER 'monty'@'localhost' PASSWORD EXPIRE INTERVAL 120 DAY |
    +------------------------------------------------------------------+
    
    SHOW CREATE USER 'konstantin'@'localhost';
    +------------------------------------------------------------+
    | CREATE USER for konstantin@localhost                       |
    +------------------------------------------------------------+
    | CREATE USER 'konstantin'@'localhost' PASSWORD EXPIRE NEVER |
    +------------------------------------------------------------+
    
    SHOW CREATE USER 'amse'@'localhost';
    +--------------------------------+
    | CREATE USER for amse@localhost |
    +--------------------------------+
    | CREATE USER 'amse'@'localhost' |
    +--------------------------------+
    WITH password_expiration_info AS (
      SELECT User, Host,
      IF(
       IFNULL(JSON_EXTRACT(Priv, '$.password_lifetime'), -1) = -1,
       @@global.default_password_lifetime,
       JSON_EXTRACT(Priv, '$.password_lifetime')
      ) AS password_lifetime,
      JSON_EXTRACT(Priv, '$.password_last_changed') AS password_last_changed
      FROM mysql.global_priv
    )
    SELECT pei.User, pei.Host,
      pei.password_lifetime,
      FROM_UNIXTIME(pei.password_last_changed) AS password_last_changed_datetime,
      FROM_UNIXTIME(
       pei.password_last_changed +
       (pei.password_lifetime * 60 * 60 * 24)
      ) AS password_expiration_datetime
      FROM password_expiration_info pei
      WHERE pei.password_lifetime != 0
       AND pei.password_last_changed IS NOT NULL
    UNION
    SELECT pei.User, pei.Host,
      pei.password_lifetime,
      FROM_UNIXTIME(pei.password_last_changed) AS password_last_changed_datetime,
      0 AS password_expiration_datetime
      FROM password_expiration_info pei
      WHERE pei.password_lifetime = 0
       OR pei.password_last_changed IS NULL;
    CREATE USER 'lorin'@'localhost' ACCOUNT LOCK;
    ALTER USER 'marijn'@'localhost' ACCOUNT LOCK;
    mariadb -ulorin
      ERROR 4151 (HY000): Access denied, this account is locked
    ALTER USER 'lorin'@'localhost' ACCOUNT UNLOCK;
    SHOW CREATE USER 'marijn'@'localhost';
    +-----------------------------------------------+
    | CREATE USER for marijn@localhost              |
    +-----------------------------------------------+
    | CREATE USER 'marijn'@'localhost' ACCOUNT LOCK |
    +-----------------------------------------------+
    SELECT CONCAT(user, '@', host, ' => ', JSON_DETAILED(priv)) 
      FROM mysql.global_priv 
      WHERE user='marijn';
    +--------------------------------------------------------------------------------------+
    | CONCAT(user, '@', host, ' => ', JSON_DETAILED(priv))                                 |
    +--------------------------------------------------------------------------------------+
    | marijn@localhost => {
        "access": 0,
        "plugin": "mysql_native_password",
        "authentication_string": "",
        "account_locked": true,
        "password_last_changed": 1558017158
    } |
    +--------------------------------------------------------------------------------------+
    SELECT CONCAT(user, '@', host) AS 'Locked Accounts' FROM mysql.global_priv WHERE Priv like '%account_locked":true%';
    +------------------------+
    | Locked Accounts        |
    +------------------------+
    | mariadb.sys@localhost  |
    | bart.simpson@localhost |
    +------------------------+
    2 rows in set (0.000 sec)
    Percona XtraBackup cannot back up instances that use encrypted InnoDB. However, MariaDB's fork, MariaDB Backup, can back up encrypted instances.
  • The Audit plugin cannot create encrypted output. Send it to syslog and configure the protection there instead.

  • File-based general query log and slow query log cannot be encrypted (MDEV-9639).

  • The Aria log is not encrypted (MDEV-8587). This affects only non-temporary Aria tables though.

  • The MariaDB error log is not encrypted. The error log can contain query text and data in some cases, including crashes, assertion failures, and cases where InnoDB write monitor output to the log to aid in debugging. It can sent to syslog too, if needed.

  • InnoDB
    innodb_encrypt_tables=1
    innodb_encrypt_log=1
    innodb_encrypt_temporary_tables=1
    innodb_encrypt_log=1
    innodb_encrypt_temporary_tables=1
    Enabling InnoDB Encryption
    Secure Connections
    mariadb-binlog
    MDEV-8813
    key management and encryption plugin
    multiple encryption keys
    key rotation
    File Key Management Plugin
    AWS Key Management Plugin
    Hashicorp Key Management Plugin
    key management and encryption plugin
    File Key Management
    InnoDB redo log
    Encrypting Data for InnoDB
    Encrypting Data for Aria
    binlog_cache_size
    binlog_stmt_cache_size
    encrypt_tmp_files=ON
    innodb_encrypt_log=ON
    encrypt_tmp_files
    binary logs
    relay logs
    Encrypting Binary Logs
    InnoDB page compression
    Encryption functions
    DES_DECRYPT()
    DES_ENCRYPT()
    blog post about table encryption
    innodb_encrypt_tables
    innodb_encryption_threads
    innodb_encryption_rotate_key_age
    ENCRYPTED
    decrypted
    background encryption threads
    check the status
    INNODB_TABLESPACES_ENCRYPTION
    information_schema
    Redo Log
    Aria
    ENCRYPTED
    ALTER TABLE
    TABLES
    ALTER TABLE
    ENCRYPTED
    Redo Log
    Aria
    system
    ALTER TABLE
    system
    innodb_encrypt_tables
    system
    innodb_encryption_threads
    innodb_encryption_rotate_key_age
    MDEV-14398
    innodb_encrypt_temporary_tables
    temporary tablespace
    option file
    Redo Log
    innodb_encrypt_log
    option group
    option file
    key management and encryption plugin
    Enabling InnoDB encryption

    Encrypting a table by setting the ENCRYPTED table option to YES when the innodb_file_per_table is set to OFF.In this case, SHOW WARNINGS would return the following:

    • Encrypting a table by setting the ENCRYPTED table option to YES, and the innodb_default_encryption_key_id system variable or the ENCRYPTION_KEY_ID table option refers to a non-existent key identifier. In this case, SHOW WARNINGS would return the following:

    • In some versions, this could happen while creating a table with the ENCRYPTED table option set to DEFAULT while the innodb_encrypt_tables system variable is set to OFF, and the innodb_default_encryption_key_id system variable or the ENCRYPTION_KEY_ID table option are not set to 1. In this case, SHOW WARNINGS would return the following:

    Creating a table with the ENCRYPTED table option set to DEFAULT while the innodb_encrypt_tables system variable is set to OFF, and the innodb_default_encryption_key_id system variable or the ENCRYPTION_KEY_ID table option are not set to 1 no longer fail, and it no longer throws a warning.

    For more information, see MDEV-18601.

    Setting Encryption Key ID For an Unencrypted Table

    If you set the ENCRYPTION_KEY_ID table option for a table that is unencrypted because the innodb_encrypt_tables system variable is set to OFF and the ENCRYPTED table option set to DEFAULT, then this encryption key ID will be saved in the table's .frm file, but the encryption key will not be saved to the table's .ibd file.

    As a side effect, with the current encryption design, if the innodb_encrypt_tables system variable is later set to ON, and InnoDB goes to encrypt the table, then the InnoDB background encryption threads will not read this encryption key ID from the .frm file. Instead, the threads may encrypt the table with the encryption key with ID 1, which is internally considered the default encryption key when no key is specified. For example:

    A similar problem is that, if you set the ENCRYPTION_KEY_ID table option for a table that is unencrypted because the ENCRYPTED table option is set to NO, then this encryption key ID will be saved in the table's .frm file, but the encryption key will not be saved to the table's .ibd file.

    Recent versions of MariaDB will throw warnings in the case where the ENCRYPTED table option is set to NO, but they will allow the operation to succeed. For example:

    However, in this case, if you change the ENCRYPTED table option to YES or DEFAULT with ALTER TABLE, then it will actually use the proper key. For example:

    For more information, see MDEV-17230, MDEV-18601, and MDEV-19086.

    Tablespaces Created on MySQL 5.1.47 or Earlier

    MariaDB's data-at-rest encryption implementation re-used previously unused fields in InnoDB's buffer pool pages to identify the encryption key version and the post-encryption checksum. Prior to MySQL 5.1.48, these unused fields were not initialized in memory due to performance concerns. These fields still had zero values most of the time, but since they were not explicitly initialized, that means that these fields could have occasionally had non-zero values that could have been written into InnoDB's tablespace files. If MariaDB were to encounter an unencrypted page from a tablespace file that was created on an early version of MySQL that also had non-zero values in these fields, then it would mistakenly think that the page was encrypted.

    The fix for MDEV-12112 changed the way that MariaDB distinguishes between encrypted and unencrypted pages, so that it is less likely to mistake an unencrypted page for an encrypted page.

    If innodb_checksum_algorithm is set to full_crc32 or strict_full_crc32, and if the table does not use ROW_FORMAT=COMPRESSED, then data files are guaranteed to be zero-initialized.

    For more information, see MDEV-18097.

    Spatial Indexes

    Support for encrypting spatial indexes. To enable, set the innodb_checksum_algorithm to full_crc32 or to strict_full_crc32. Note that MariaDB only encrypts spatial indexes when the ROW_FORMAT table option is not set to COMPRESSED.

    For more information, see MDEV-12026.

    This page is licensed: CC BY-SA / Gnu FDL

    CREATE TABLE
    ALTER TABLE
    SHOW WARNINGS
    Authentication is done using the Hashicorp Vault's token authentication method.
  • If additional client authentication is required, then the path to the CA authentication bundle file may be passed as a plugin parameter;

  • The creation of the keys and their management is carried out using the Hashicorp Vault KMS and their tools.

  • The plugin uses libcurl (https) as an interface to the HashiCorp Vault server;

  • JSON parsing is performed through the JSON service (through the include/mysql/service_json.h);

  • HashiCorp Vault 1.2.4 was used for development and testing.

  • As of MariaDB 10.6.24, the plugin is configured to use cached keys for all communication errors, not just for timeouts. This ensures continuous operation when the Vault server is temporarily unreachable.

  • As of MariaDB 10.6.24, the default setting for cache usage on error is ON.

  • Since we require support for key versioning, the key-value storage must be configured in Hashicorp Vault as a key-value storage that uses the interface of the second version. For example, you can create it as follows:

    Key names must correspond to their numerical identifiers. Key identifiers itself, their possible values and rules of use are described in more detail in the MariaDB main documentation.

    From the point of view of the key-value storage (in terms of Hashicorp Vault), the key is a secret containing one key-value pair with the name "data" and a value representing a binary string containing the key value, for example:

    Keys values are strings containing binary data. MariaDB currently uses the AES algorithm with 256-bit keys as the default encryption method. In this case, the keys that will be stored in the Hashicorp Vault should be 32-byte strings. Most likely you will use some utilities for creating and administering keys designed to work with Hashicorp Vault. But in the simplest case, keys can be created from the command line through the vault utility, for example, as follows:

    If you use default encryption (AES), you should ensure that the key length is 32 bytes, otherwise it may fail to use InnoDB as a data storage.

    The plugin currently does not unseal Hashicorp Vault on its own, you must do this in advance and on your own.

    To use Hashicorp Vault KMS, the plugin must be preloaded and activated on the server. Most of its parameters should not be changed during plugin operation and therefore must be preconfigured as part of the server configuration through configuration file or command line options:

    Options

    The plugin supports the following parameters, which must be set in advance and cannot be changed during server operation:

    hashicorp-key-management-vault-url

    • Description: HTTP[s] URL that is used to connect to the Hashicorp Vault server. It must include the name of the scheme (https:// for a secure connection) and, according to the API rules for storages of the key-value type in Hashicorp Vault, after the server address, the path must begin with the "/v1/" string (as prefix), for example: https://127.0.0.1:8200/v1/my_secrets. By default, the path is not set, therefore you must replace with the correct path to your secrets.

    • Command line: --[loose-]hashicorp-key-management-vault-url="<url>"

    hashicorp-key-management-token

    • Description: Authentication token that passed to the Hashicorp Vault in the request header. By default, this parameter contains an empty string, so you must specify the correct value for it, otherwise the Hashicorp Vault server will refuse authorization. Alternatively, you can define an environment variable VAULT_TOKEN and store the token there.

    • Command line: --[loose-]hashicorp-key-management-token="<token>"

    hashicorp-key-management-vault-ca

    • Description: Path to the Certificate Authority (CA) bundle (is a file that contains root and intermediate certificates). By default, this parameter contains an empty string, which means no CA bundle.

    • Command line: --[loose-]hashicorp-key-management-vault-ca="<path>"

    hashicorp-key-management-timeout

    • Description: Set the duration (in seconds) for the Hashicorp Vault server connection timeout. The default value is 15 seconds. The allowed range is from 1 to 86400 seconds. The user can also specify a zero value, which means the default timeout value set by the libcurl library (currently 300 seconds).

    • Command line: --[loose-]hashicorp-key-management-timeout=<timeout>

    hashicorp-key-management-max-retries

    • Description: Number of server request retries in case of timeout. Default is three retries.

    • Command line: ----[loose-]hashicorp-key-management-max-retries=<retries>

    hashicorp-key-management-caching-enabled

    • Description: Enable key caching (storing key values received from the Hashicorp Vault server in the local memory). By default caching is enabled.

    • Command line: --[loose-]hashicorp-key-management-caching-enabled="on"|"off"

    hashicorp-key-management-use-cache-on-timeout

    • Description: This parameter instructs the plugin to use the key values or version numbers taken from the cache in the event of a timeout when accessing the vault server. By default this option is disabled. Please note that key values or version numbers will be read from the cache when the timeout expires only after the number of attempts to read them from the storage server that specified by the --[loose-]hashicorp-key-management-max-retries parameter has been exhausted.

    • Command line: --[loose-]hashicorp-key-management-use-cache-on-timeout="on"|"off"

    hashicorp-key-management-cache-timeout

    • Description: The time (in milliseconds) after which the value of the key stored in the cache becomes invalid and an attempt to read this data causes a new request send to the vault server. By default, cache entries become invalid after 60,000 milliseconds (after one minute). If the value of this parameter is zero, then the keys will always be considered invalid, but they still can be used if the vault server is unavailable and the corresponding cache operating mode (--[loose-]hashicorp-key-management-use-cache-on-timeout="on") is enabled.

    • As of MariaDB 10.6.24, the default value is 1 year (specified in milliseconds).

    • Command line: --[loose-]hashicorp-key-management-cache-timeout=<timeout>

    hashicorp-key-management-cache-version-timeout

    • Description: The time (in milliseconds) after which the information about latest version number of the key (which stored in the cache) becomes invalid and an attempt to read this information causes a new request send to the vault server. If the value of this parameter is zero, then information about latest key version numbers always considered invalid, unless there is no communication with the vault server and use of the cache is allowed when the server is unavailable. By default, this parameter is zero, that is, the latest version numbers for the keys stored in the cache are considered always invalid, except when the vault server is unavailable and use of the cache is allowed on server failures.

    • Command line: --[loose-]hashicorp-key-management-cache-version-timeout=<timeout>

    hashicorp-key-management-check-kv-version

    • Description: This parameter enables ("on", this is the default value) or disables ("off") checking the kv storage version during plugin initialization. The plugin requires storage to be version 2 or older in order for it to work properly.

    • Command line: --[loose-]hashicorp-key-management-check-kv-version="on"|"off"

    Key Rotation and Cache Flushing

    Available as of MariaDB 12.3

    The HashiCorp Key Management plugin supports key versioning provided by the HashiCorp Vault Server. In previous versions, rotating keys required a server restart to clear the internal cache. As of MariaDB 12.3, you can flush the plugin cache manually while the server is running.

    Flushing the Cache

    To rotate keys, you must flush the cached keys using the FLUSH command. This clears the local cache, forcing the server to re-fetch the latest key versions from the HashiCorp Vault server upon the next access.

    Executing this command requires the RELOAD privilege.

    Verifying Key Versions

    To view the current Key IDs and Key Versions stored in the latest version cache, you can query the Information Schema table or use the SHOW command.

    See Information Schema HASHICORP_KEY_MANAGEMENT_CACHE for table details.

    Using the SHOW command:

    See Also

    • HashiCorp Vault and MariaDB

    This page is licensed: CC BY-SA / Gnu FDL

    Key Rotation and Cache Flushing
    Hashicorp Vault and MariaDB
    Install Vault
    MySQL/MariaDB Database Secrets Engine
    SET GLOBAL innodb_encrypt_tables = OFF;
    SET GLOBAL innodb_encryption_threads = 4;
    SET GLOBAL innodb_encryption_rotate_key_age = 1;
    SELECT COUNT(*) AS "Number of Encrypted Tablespaces"
    FROM information_schema.INNODB_TABLESPACES_ENCRYPTION
    WHERE ENCRYPTION_SCHEME != 0
       OR ROTATING_OR_FLUSHING != 0;
    SELECT TABLE_SCHEMA AS "Database", TABLE_NAME AS "Table"
    FROM information_schema.TABLES
    WHERE ENGINE='InnoDB' 
          AND CREATE_OPTIONS LIKE '%`ENCRYPTED`=YES%';
    SELECT NAME, ENCRYPTION_SCHEME, CURRENT_KEY_ID
    FROM information_schema.INNODB_TABLESPACES_ENCRYPTION
    WHERE NAME='db1/tab1';
    +----------+-------------------+----------------+
    | NAME     | ENCRYPTION_SCHEME | CURRENT_KEY_ID |
    +----------+-------------------+----------------+
    | db1/tab1 |                 1 |            100 |
    +----------+-------------------+----------------+
    
    ALTER TABLE tab1
       ENCRYPTED=NO;
    
    SELECT NAME, ENCRYPTION_SCHEME, CURRENT_KEY_ID
    FROM information_schema.INNODB_TABLESPACES_ENCRYPTION
    WHERE NAME='db1/tab1';
    +----------+-------------------+----------------+
    | NAME     | ENCRYPTION_SCHEME | CURRENT_KEY_ID |
    +----------+-------------------+----------------+
    | db1/tab1 |                 0 |            100 |
    +----------+-------------------+----------------+
    CREATE TABLE `test`.`table1` ( `id` INT(4) PRIMARY KEY , `name` VARCHAR(50));
    ERROR 1005 (HY000): Can't create table `test`.`table1` (errno: 140 "Wrong create options")
    SHOW WARNINGS;
    +---------+------+---------------------------------------------------------------------+
    | Level   | Code | Message                                                             |
    +---------+------+---------------------------------------------------------------------+
    | Warning |  140 | InnoDB: ENCRYPTED requires innodb_file_per_table                    |
    | Error   | 1005 | Can't create table `db1`.`tab3` (errno: 140 "Wrong create options") |
    | Warning | 1030 | Got error 140 "Wrong create options" from storage engine InnoDB     |
    +---------+------+---------------------------------------------------------------------+
    3 rows in set (0.00 sec)
    SHOW WARNINGS;
    +---------+------+---------------------------------------------------------------------+
    | Level   | Code | Message                                                             |
    +---------+------+---------------------------------------------------------------------+
    | Warning |  140 | InnoDB: ENCRYPTION_KEY_ID 500 not available                         |
    | Error   | 1005 | Can't create table `db1`.`tab3` (errno: 140 "Wrong create options") |
    | Warning | 1030 | Got error 140 "Wrong create options" from storage engine InnoDB     |
    +---------+------+---------------------------------------------------------------------+
    3 rows in set (0.00 sec)
    SHOW WARNINGS;
    +---------+------+---------------------------------------------------------------------+
    | Level   | Code | Message                                                             |
    +---------+------+---------------------------------------------------------------------+
    | Warning |  140 | InnoDB: innodb_encrypt_tables=OFF only allows ENCRYPTION_KEY_ID=1   |
    | Error   | 1005 | Can't create table `db1`.`tab3` (errno: 140 "Wrong create options") |
    | Warning | 1030 | Got error 140 "Wrong create options" from storage engine InnoDB     |
    +---------+------+---------------------------------------------------------------------+
    3 rows in set (0.00 sec)
    SET GLOBAL innodb_encrypt_tables=OFF;
    
    CREATE TABLE tab1 (
       id INT PRIMARY KEY,
       str VARCHAR(50)
    ) ENCRYPTION_KEY_ID=100;
    
    SET GLOBAL innodb_encrypt_tables=ON;
    
    SELECT NAME, ENCRYPTION_SCHEME, CURRENT_KEY_ID
    FROM information_schema.INNODB_TABLESPACES_ENCRYPTION
    WHERE NAME='db1/tab1';
    +----------+-------------------+----------------+
    | NAME     | ENCRYPTION_SCHEME | CURRENT_KEY_ID |
    +----------+-------------------+----------------+
    | db1/tab1 |                 1 |              1 |
    +----------+-------------------+----------------+
    CREATE TABLE tab1 (
       id INT PRIMARY KEY,
       str VARCHAR(50)
    ) ENCRYPTED=NO ENCRYPTION_KEY_ID=100;
    Query OK, 0 rows affected, 1 warning (0.01 sec)
    
    SHOW WARNINGS;
    +---------+------+--------------------------------------------------+
    | Level   | Code | Message                                          |
    +---------+------+--------------------------------------------------+
    | Warning |  140 | InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1 |
    +---------+------+--------------------------------------------------+
    1 row in set (0.00 sec)
    SET GLOBAL innodb_encrypt_tables=ON;
    
    ALTER TABLE tab1 ENCRYPTED=DEFAULT;
    
    SELECT NAME, ENCRYPTION_SCHEME, CURRENT_KEY_ID
    FROM information_schema.INNODB_TABLESPACES_ENCRYPTION
    WHERE NAME = 'db1/tab1';
    +----------+-------------------+----------------+
    | NAME     | ENCRYPTION_SCHEME | CURRENT_KEY_ID |
    +----------+-------------------+----------------+
    | db1/tab1 |                 1 |            100 |
    +----------+-------------------+----------------+
    ~$ vault secrets enable -path /test -version=2 kv
    ~$ vault kv get /test/1
    
    ====== Metadata ======
    Key              Value
    ---              -----
    created_time     2019-12-14T14:19:19.42432951Z
    deletion_time    n/a
    destroyed        false
    version          1
    
    ==== Data ====
    Key     Value
    ---     -----
    data    0123456789ABCDEF0123456789ABCDEF
    ~$ vault kv put /test/1 data="0123456789ABCDEF0123456789ABCDEF"
    --plugin-load-add=hashicorp_key_management.so
    --loose-hashicorp-key-management
    --loose-hashicorp-key-management-vault-url="$VAULT_ADDR/v1/test"
    --loose-hashicorp-key-management-token="$VAULT_TOKEN"
    FLUSH HASHICORP_KEY_MANAGEMENT_CACHE;
    SHOW HASHICORP_KEY_MANAGEMENT_CACHE;
    ssl_
    , but internally, MariaDB only supports its secure successors.

    In order to secure connections between the primary and replica, you need to ensure that both servers were compiled with TLS support. See Secure Connections Overview to determine how to check whether a server was compiled with TLS support.

    You also need an X509 certificate, a private key, and the Certificate Authority (CA) chain to verify the X509 certificate for the primary. If you want to use two-way TLS, then you will also an X509 certificate, a private key, and the Certificate Authority (CA) chain to verify the X509 certificate for the replica. If you want to use self-signed certificates that are created with OpenSSL, then see Certificate Creation with OpenSSL for information on how to create those.

    Securing Replication Traffic

    In order to secure replication traffic, you will need to ensure that TLS is enabled on the primary. If you want to use two-way TLS, then you will also need to ensure that TLS is enabled on the replica. See Securing Connections for Client and Server for information on how to do that.

    For example, to set the TLS system variables for each server, add them to a relevant server option group in an option file on each server:

    And then restart the server to make the changes persistent.

    At this point, you can reconfigure the replicas to use TLS to encrypt replicated data in transit. There are two methods available to do this:

    • Executing the CHANGE MASTER statement to set the relevant TLS options.

    • Setting TLS client options in an option file.

    Executing CHANGE MASTER

    TLS can be enabled on a replication replica by executing the CHANGE MASTER statement. In order to do so, there are a number of options that you would need to set. The specific options that you would need to set would depend on whether you want one-way TLS or two-way TLS, and whether you want to verify the server certificate.

    Enabling Two-Way TLS with CHANGE MASTER

    Two-way TLS means that both the client and server provide a private key and an X509 certificate. It is called "two-way" TLS because both the client and server can be authenticated. In this case, the "client" is the replica. To configure two-way TLS, you would need to set the following options:

    • You need to set the path to the server's certificate by setting the MASTER_SSL_CERT option.

    • You need to set the path to the server's private key by setting the MASTER_SSL_KEY option.

    • You need to set the path to the certificate authority (CA) chain that can verify the server's certificate by setting either the MASTER_SSL_CA or the MASTER_SSL_CAPATH options.

    • If you want server certificate verification, then you also need to set the MASTER_SSL_VERIFY_SERVER_CERT option (enabled by default from ).

    • If you want to restrict the server to certain ciphers, then you also need to set the option.

    If the replica threads are currently running, you first need to stop them by executing the STOP SLAVE statement. For example:

    Then, execute the CHANGE MASTER statement to configure the replica to use TLS. For example:

    At this point, you can start replication by executing the START SLAVE statement. For example:

    The replica now uses TLS to encrypt data in transit as it replicates it from the primary.

    Enabling One-Way TLS with CHANGE MASTER

    Enabling One-Way TLS with CHANGE MASTER with Server Certificate Verification

    One-way TLS means that only the server provides a private key and an X509 certificate. When TLS is used without a client certificate, it is called "one-way" TLS, because only the server can be authenticated, so authentication is only possible in one direction. However, encryption is still possible in both directions. Server certificate verification means that the client verifies that the certificate belongs to the server. In this case, the "client" is the replica. This mode is enabled by default starting from . To configure one-way TLS in earlier versions, you would need to set the following options:

    • You need to set the path to the certificate authority (CA) chain that can verify the server's certificate by setting either the MASTER_SSL_CA or the MASTER_SSL_CAPATH options.

    • You need to set the MASTER_SSL_VERIFY_SERVER_CERT option.

    • If you want to restrict the server to certain ciphers, then you also need to set the MASTER_SSL_CIPHER option.

    If the replica threads are currently running, you first need to stop them by executing the STOP SLAVE statement. For example:

    Then, execute the CHANGE MASTER statement to configure the replica to use TLS. For example:

    At this point, you can start replication by executing the START SLAVE statement. For example:

    The replica now uses TLS to encrypt data in transit as it replicates it from the primary.

    Enabling One-Way TLS with CHANGE MASTER without Server Certificate Verification

    One-way TLS means that only the server provides a private key and an X509 certificate. When TLS is used without a client certificate, it is called "one-way" TLS, because only the server can be authenticated, so authentication is only possible in one direction. However, encryption is still possible in both directions. In this case, the "client" is the replica. To configure two-way TLS without server certificate verification, you would need to set the following options:

    • You need to configure the replica to use TLS by setting the MASTER_SSL option.

    • If you want to restrict the server to certain ciphers, then you also need to set the MASTER_SSL_CIPHER option.

    • Starting from you need to disable the MASTER_SSL_VERIFY_SERVER_CERT option.

    If the replica threads are currently running, you first need to stop them by executing the STOP SLAVE statement. For example:

    Then, execute the CHANGE MASTER statement to configure the replica to use TLS. For example:

    At this point, you can start replication by executing the START SLAVE statement. For example:

    The replica now uses TLS to encrypt data in transit as it replicates it from the primary.

    Setting TLS Client Options in an Option File

    In cases where you don't mind restarting the server or you are setting the server up from scratch for the first time, you may find it more convenient to configure TLS options for replication through an option file. This is done the same way as it is for other clients. The specific options that you would need to set would depend on whether you want one-way TLS or two-way TLS, and whether you want to verify the server certificate. See Securing Connections for Client and Server: Enabling TLS for MariaDB Clients for more information. For example, to enable two-way TLS with server certificate verification, then you could specify the following options in a relevant client option group in an option file:

    Before you restart the server, you may also want to set the --skip-slave-start option in a server option group in an option file. This option prevents the replica threads from restarting automatically when the server starts. Instead, they will have to be restarted manually. After these changes have been made, you can restart the server. Once the server is back online, set the MASTER_SSL option by executing the CHANGE MASTER statement. This will enable TLS. For example:

    The certificate and keys will be read from the option file. At this point, you can start replication by executing the START SLAVE statement.

    This page is licensed: CC BY-SA / Gnu FDL

    MDEV-18777
    .

    InnoDB encrypts the Redo Log using the encryption key with the ID 1.

    Keys with Manually Encrypted Tablespaces

    With tables that use manually enabled encryption, one way to set the specific encryption key for the table is to use the ENCRYPTION_KEY_ID table option. For example:

    If the ENCRYPTION_KEY_ID table option is not set for a table that uses manually enabled encryption, then it will inherit the value from the innodb_default_encryption_key_id system variable. For example:

    Keys with Automatically Encrypted Tablespaces

    With tables that use automatically enabled encryption, one way to set the specific encryption key for the table is to use the innodb_default_encryption_key_id system variable. For example:

    InnoDB tables that are part of the system tablespace can only be encrypted using the encryption key set by the innodb_default_encryption_key_id system variable.

    If the table is in a file-per-table tablespace, and if innodb_encrypt_tables is set to ON or FORCE, and if innodb_encryption_threads is set to a value greater than 0, then you can also set the specific encryption key for the table by using the ENCRYPTION_KEY_ID table option. For example:

    However, if innodb_encrypt_tables is set to OFF or if innodb_encryption_threads is set to 0, then this will not work. See InnoDB Encryption Troubleshooting: Setting Encryption Key ID For an Unencrypted Table for more information.

    Key Rotation

    Some key management and encryption plugins allow you to automatically rotate and version your encryption keys. If a plugin support key rotation, and if it rotates the encryption keys, then InnoDB's background encryption threads can re-encrypt InnoDB pages that use the old key version with the new key version.

    You can set the maximum age for an encryption key using the innodb_encryption_rotate_key_age system variable. When this variable is set to a non-zero value, background encryption threads constantly check pages to determine if any page is encrypted with a key version that's too old. When the key version is too old, any page encrypted with the older version of the key is automatically re-encrypted in the background to use a more current version of the key. Bear in mind, this constant checking can sometimes result in high CPU usage.

    Key rotation for the InnoDB Redo Log is only supported in and later. For more information, see MDEV-12041.

    In order for key rotation to work, both the backend key management service (KMS) and the corresponding key management and encryption plugin have to support key rotation. See Encryption Key Management: Support for Key Rotation in Encryption Plugins to determine which plugins currently support key rotation.

    Disabling Background Key Rotation Operations

    In the event that you encounter issues with background key encryption, you can disable it by setting the innodb_encryption_rotate_key_age system variable to 0. You may find this useful when the constant key version checks lead to excessive CPU usage. It's also useful in cases where your encryption key management plugin does not support key rotation, (such as with the file_key_management plugin). For more information, see MDEV-14180.

    There are, however, issues that can arise when the background key rotation is disabled.

    Pending Encryption Operations

    When updating the value on the innodb_encrypt_tables system variable, InnoDB internally treats the subsequent background operations to encrypt and decrypt tablespaces as background key rotations. See MDEV-14398 for more information.

    You can check the status of background encryption operations by querying the INNODB_TABLESPACES_ENCRYPTION table in the information_schema database.

    See InnoDB Background Encryption Threads: Checking the Status of Background Operations for some example queries.

    For more information, see MDEV-14398.

    This page is licensed: CC BY-SA / Gnu FDL

    encryption key management
    encryption keys
    innodb_default_encryption_key_id
    ENCRYPTION_KEY_ID
    file-per-table
    temporary tablespace
    Encryption Keys

    Key management and encryption plugins support using multiple encryption keys. Each encryption key can be defined with a different 32-bit integer as a key identifier.

    MariaDB uses the encryption key with ID 1 to encrypt binary logs.

    Key Rotation

    Some key management and encryption plugins allow you to automatically rotate and version your encryption keys. If a plugin supports key rotation, and if it rotates the encryption keys, then InnoDB's background encryption threads can re-encrypt InnoDB pages that use the old key version with the new key version. However, the binary log does not have a similar mechanism, which means that existing binary logs remain encrypted with the older key version, but new binary logs will be encrypted with the new key version. For more information, see MDEV-20098.

    In order for key rotation to work, both the backend key management service (KMS) and the corresponding key management and encryption plugin have to support key rotation. See Encryption Key Management: Support for Key Rotation in Encryption Plugins to determine which plugins currently support key rotation.

    Enabling Encryption

    Encryption of binary logs can be enabled by following the process:

    • First, stop the server.

    • Then, set encrypt_binlog=ON in the MariaDB configuration file.

    • Then, start the server.

    From that point forward, any new binary logs will be encrypted. To delete old unencrypted binary logs, you can use RESET MASTER or PURGE BINARY LOGS.

    Disabling Encryption

    Encryption of binary logs can be disabled by following the process:

    • First, stop the server.

    • Then, set encrypt_binlog=OFF in the MariaDB configuration file.

    • Then, start the server.

    From that point forward, any new binary logs will be unencrypted. If you would like the server to continue to have access to old encrypted binary logs, then make sure to keep your key management and encryption plugin loaded.

    Understanding Binlog Encryption

    When starting with binary log encryption, MariaDB Server logs a Format_descriptor_log_event and a START_ENCRYPTION_EVENT, then encrypts all subsequent events for the binary log.

    Each event's header and footer are created and processed to produce encrypted blocks. These encrypted blocks are produced before transactions are committed and before the events are flushed to the binary log. As such, they exist in an encrypted state in memory buffers and in the IO_CACHE files for user connections.

    Effects of Data-at-Rest Encryption on Replication

    When using encrypted binary logs with replication, it is completely supported to have different encryption keys on the master and slave. The master decrypts encrypted binary log events as it reads them from disk, and before its binary log dump thread sends them to the slave, so the slave actually receives the unencrypted binary log events.

    If you want to ensure that binary log events are encrypted as they are transmitted between the master and slave, then you will have to use TLS with the replication connection.

    Effects of Data-at-Rest Encryption on mariadb-binlog

    mariadb-binlog does not currently have the ability to decrypt encrypted binary logs on its own (see MDEV-8813 about that). In order to use mariadb-binlog with encrypted binary logs, you have to use the --read-from-remote-server command-line option, so that the server can decrypt the binary logs for mariadb-binlog.

    Note, using the --read-from-remote-server option on versions of the mariadb-binlog utility that do not have the MDEV-20574 fix (<=, , ) can corrupt binlog positions when the binary log is encrypted.

    This page is licensed: CC BY-SA / Gnu FDL

    binary logs
    relay logs
    binary logs
    relay logs
    encrypt_binlog
    key management and encryption plugin
    File Key Management Plugin
    AWS Key Management Plugin

    Securing Connections for Client and Server

    Starting from 11.4 MariaDB, it encrypts the transmitted data between the server and clients by default unless the server and client run on the same host.

    Before that the default behavior was to transmit the data unencrypted over the network introducing a security concerns as a malicious actor could potentially eavesdrop on the traffic as it is sent over the network between them.

    The data in transit are encrypted (by default or if enabled manually) using the Transport Layer Security (TLS) protocol. TLS was formerly known as Secure Socket Layer (SSL), but strictly speaking the SSL protocol is a predecessor to TLS and, that version of the protocol is now considered insecure. The documentation still uses the term SSL often and for compatibility reasons TLS-related server system and status variables still use the prefix ssl_, but internally, MariaDB only supports its secure successors.

    Enabling TLS

    Enabling TLS for MariaDB Server

    MariaDB enables TLS automatically. Certificates are generated on startup and only stored in memory. Certificate verification is enabled by default on the client side and certificates are verified if the authentication plugin itself is MitM safe (mysql_native_password, ed25519, parsec).

    In order to enable TLS in a MariaDB server, you need to generate TLS certificates and configure the server to use them.

    To do that there are a number of system variables that you need to set, such as:

    • You need to set the path to the server's X509 certificate by setting the system variable.

    Reloading the Server's Certificates and Keys Dynamically

    The FLUSH SSL command can be used to dynamically reinitialize the server's context.

    See for more information.

    Enabling TLS for MariaDB Clients

    Different may use different methods to enable TLS. You can let the client to use TLS without specifying client-side certificate — this is called a one-way TLS below — to have the connection encrypted. Or you can additionally provide client-side certificate — this is two-way TLS — which will allow the server to do the certificate based client authentication.

    Enabling One-Way TLS for MariaDB Clients

    One-way TLS means that only the server provides a private key and an X509 certificate. When TLS is used without a client certificate, it is called "one-way" TLS, because only the server can be authenticated, so certificate based authentication is only possible in one direction. However, encryption is still possible in both directions. means that the client verifies that the certificate belongs to the server.

    MariaDB starting with

    Starting from (Connector/C version 3.4) this mode is enabled by default. Connector/C will enable TLS automatically on all non-local connections and will require a verified server certificate to prevent man-in-the-middle attacks.

    To enable one-way TLS manually (for older clients or if you want verification with CA certificate) you can specify these options in a relevant client in an :

    Or if you wanted to specify them on the command-line with the client, then you could execute something like this:

    You can disable server certificate verification with

    (or a similar command line option), but it creates a risk of a man-in-the-middle attack where the connection can be eavesdropped or manipulated even if it is being encrypted.

    Enabling Two-Way TLS for MariaDB Clients

    Two-way TLS means that both the client and server provide a private key and an X509 certificate. It is called "two-way" TLS because both the client and server can be authenticated.

    For example, to specify these options in a relevant client in an , you could set the following:

    Or if you wanted to specify them on the command-line with the client, then you could execute something like this:

    Two-way SSL is required for an account if the REQUIRE X509, REQUIRE SUBJECT, and/or REQUIRE ISSUER clauses are specified for the account.

    Enabling TLS for MariaDB Connector/C Clients

    See the documentation on MariaDB Connector/C's for information on how to enable TLS for clients that use MariaDB Connector/C.

    Enabling TLS for MariaDB Connector/ODBC Clients

    See the documentation on MariaDB Connector/ODBC's TLS-Related Connection Parameters for information on how to enable TLS for clients that use MariaDB Connector/ODBC.

    Enabling TLS for MariaDB Connector/J Clients

    See the documentation on for information on how to enable TLS for clients that use MariaDB Connector/J.

    Verifying that a Connection is Using TLS

    You can verify that a connection is using TLS by checking the connection's status variable. It will either show the TLS version used, or be empty when no encryption is in effect. For example:

    Requiring TLS

    From , the system variable is available. When set (by default it is off), connections attempted using insecure transport will be rejected. Secure transports are SSL/TLS, Unix sockets or named pipes. Note that requirements set for specific user accounts will take precedence over this setting.

    Requiring TLS for Specific User Accounts

    You can set certain TLS-related restrictions for specific user accounts. For instance, you might use this with user accounts that require access to sensitive data while sending it across networks that you do not control. These restrictions can be enabled for a user account with the , , or statements. For example:

    • A user account must connect via TLS if the user account is defined with the REQUIRE SSL clause.

    • A user account must connect via TLS with a specific cipher if the user account is defined with the REQUIRE CIPHER clause.

    • A user account must connect via TLS with a valid client certificate if the user account is defined with the REQUIRE X509 clause.

    • A user account must connect via TLS with a specific client certificate if the user account is defined with the REQUIRE SUBJECT clause.

    • A user account must connect via TLS with a client certificate that must be signed by a specific certificate authority if the user account is defined with the REQUIRE ISSUER clause.

    Requiring TLS for Specific User Accounts from Specific Hosts

    A user account can have different definitions depending on what host the user account is logging in from. Therefore, it is possible to have different TLS requirements for the same username for different hosts. For example:

    In the above example, the alice user account does not require TLS when logging in from localhost. However, when the alice user account logs in from any other host, they must use TLS with the given cipher, and they must provide a valid client certificate with the given subject that must have been signed by the given issuer.

    This page is licensed: CC BY-SA / Gnu FDL

    Authentication

    MariaDB 10.4 introduced a number of changes to the authentication process, intended to make things easier and more intuitive. Those changes aren't available in earlier versions of MariaDB.

    For Windows, see Authentication Plugin - GSSAPI.

    Overview

    There are four new main features in 10.4 relating to authentication:

    • It is possible to use more than one for each user account. For example, this can be useful to slowly migrate users to the more secure authentication plugin over time, while allowing the old authentication plugin as an alternative for the transitional period.

    • The root@localhost user account created by is created with the ability to use two .

      • First, it is configured to try to use the authentication plugin. This allows the root@localhost user to log in without a password via the local Unix socket file defined by the

    Description

    As a result of the above changes, the open-for-everyone all-powerful root account is finally gone. And installation scripts will no longer demand that you “PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER!”, because the root account is securely created automatically.

    Two all-powerful accounts are created by default — root and the OS user that owns the data directory, typically mysql. They are created as:

    Using unix_socket means that if you are the system root user, you can log in as root@locahost without a password. This technique was pioneered by Otto Kekäläinen in Debian MariaDB packages and has been successfully since as early as .

    It is based on a simple fact that asking the system root for a password adds no extra security — root has full access to all the data files and all process memory anyway. But not asking for a password means there is no root password to forget (no need for the numerous tutorials on “how to reset MariaDB root password”). And if you want to script some tedious database work, there is no need to store the root password in plain text for the script to use (no need for debian-sys-maint user).

    Still, some users may wish to log in as MariaDB root without using sudo. Hence the old authentication method — conventional MariaDB password — is still available. By default, it is disabled (“invalid” is not a valid password hash), but one can set the password with a usual statement. And still retain the password-less access via sudo.

    If you install MariaDB locally (say from a tarball), you will not want to use sudo to be able to log in. This is why MariaDB creates a second all-powerful user with the same name as a system user that owns the data directory. In local (not system-wide) installations, this will be the user who installed MariaDB — they automatically get convenient password-less root-like access, because they can access all the data files anyway.

    Even if MariaDB is installed system-wide, you may not want to run your database maintenance scripts as system root — now you can run them as system mysql user. And you will know that they will never destroy your entire system, even if you make a typo in a shell script.

    However, seasoned MariaDB DBAs who are used to the old ways do need to make some changes. See the examples below for common tasks.

    Cookbook

    After installing MariaDB system-wide, the first thing you’ve got used to doing is logging in to the unprotected root account and protecting it, that is, setting the root password:

    This is not only unnecessary now, but it will also simply not work — there is no unprotected root account. To log in as the root user, use

    Note that it implies you are connecting via the unix socket, not tcp. If you happen to have protocol=tcp in a system-wide /etc/my.cnf file, use sudo mariadb --protocol=socket.

    After installing MariaDB locally, you’ve also used it to connect to the unprotected root account using mariadb -uroot. This will not work either; simply use mariadb without specifying a username.

    If you've forgotten your root password, no problem — you can still connect using sudo and change the password. And if you've also removed unix_socket authentication, to restore access, do as follows:

    • restart MariaDB with --skip-grant-tables

    • log in to the unprotected server

    • run (note, before 10.4, this would’ve been the last step, not anymore). This disables --skip-grant-tables and allows you to change the stored authentication method

    • run FOR root@localhost to change the root password.

    To view inside privilege tables, the old mysql.user table still exists. You can select from it as before, although you cannot update it anymore. It doesn’t show alternative authentication plugins, and this was one of the reasons for switching to the mysql.global_priv table — complex authentication rules did not fit into the rigid structure of a relational table. You can select from the new table, for example:

    Reverting to the Previous Authentication Method for root@localhost

    If you don't want the root@localhost user account created by to use authentication by default, then there are a few ways to revert to the previous authentication method for this user account.

    Configuring mariadb-install-db to Revert to the Previous Authentication Method

    One way to revert to the previous authentication method for the root@localhost user account is to execute with a special option. If is executed while --auth-root-authentication-method=normal is specified, then it will create the default user accounts using the default behavior of and before.

    This means that the root@localhost user account will use authentication by default. There are some other differences as well. See for more information.

    For example, the option can be set on the command-line while running :

    The option can also be set in an in an supported by . For example:

    If the option is set in an and if is executed, then will read this option from the , and it will automatically set this option.

    Altering the User Account to Revert to the Previous Authentication Method

    If you have already installed MariaDB, and if the root@localhost user account is already using authentication, then you can revert to the old authentication method for the user account by executing the following:

    See Also

    This page is licensed: CC BY-SA / Gnu FDL

    [mariadb]
    ...
    ssl_cert = /etc/my.cnf.d/certificates/server-cert.pem
    ssl_key = /etc/my.cnf.d/certificates/server-key.pem
    ssl_ca = /etc/my.cnf.d/certificates/ca.pem
    STOP SLAVE;
    CHANGE MASTER TO
       MASTER_SSL_CERT = '/path/to/client-cert.pem',
       MASTER_SSL_KEY = '/path/to/client-key.pem',
       MASTER_SSL_CA = '/path/to/ca/ca.pem',
       MASTER_SSL_VERIFY_SERVER_CERT=1;
    START SLAVE;
    STOP SLAVE;
    CHANGE MASTER TO
       MASTER_SSL_CA = '/path/to/ca/ca.pem',
       MASTER_SSL_VERIFY_SERVER_CERT=1;
    START SLAVE;
    STOP SLAVE;
    CHANGE MASTER TO
       MASTER_SSL=1, MASTER_SSL_VERIFY_SERVER_CERT=0;
    START SLAVE;
    [client-mariadb]
    ...
    ssl_cert = /etc/my.cnf.d/certificates/client-cert.pem
    ssl_key = /etc/my.cnf.d/certificates/client-key.pem
    ssl_ca = /etc/my.cnf.d/certificates/ca.pem
    ssl-verify-server-cert
    CHANGE MASTER TO
       MASTER_SSL=1;
    START SLAVE;
    CREATE TABLE tab1 (
       id INT PRIMARY KEY,
       str VARCHAR(50)
    ) ENCRYPTED=YES ENCRYPTION_KEY_ID=100;
    
    SELECT NAME, ENCRYPTION_SCHEME, CURRENT_KEY_ID
    FROM information_schema.INNODB_TABLESPACES_ENCRYPTION
    WHERE NAME='db1/tab1';
    +----------+-------------------+----------------+
    | NAME     | ENCRYPTION_SCHEME | CURRENT_KEY_ID |
    +----------+-------------------+----------------+
    | db1/tab1 |                 1 |            100 |
    +----------+-------------------+----------------+
    SET SESSION innodb_default_encryption_key_id=100;
    
    CREATE TABLE tab1 (
       id INT PRIMARY KEY,
       str VARCHAR(50)
    ) ENCRYPTED=YES;
    
    SELECT NAME, ENCRYPTION_SCHEME, CURRENT_KEY_ID
    FROM information_schema.INNODB_TABLESPACES_ENCRYPTION
    WHERE NAME='db1/tab1';
    +----------+-------------------+----------------+
    | NAME     | ENCRYPTION_SCHEME | CURRENT_KEY_ID |
    +----------+-------------------+----------------+
    | db1/tab1 |                 1 |            100 |
    +----------+-------------------+----------------+
    SET GLOBAL innodb_encryption_threads=4;
    
    SET GLOBAL innodb_encrypt_tables=ON;
    
    SET SESSION innodb_default_encryption_key_id=100;
    
    CREATE TABLE tab1 (
       id INT PRIMARY KEY,
       str VARCHAR(50)
    );
    
    SELECT NAME, ENCRYPTION_SCHEME, CURRENT_KEY_ID
    FROM information_schema.INNODB_TABLESPACES_ENCRYPTION
    WHERE NAME='db1/tab1';
    +----------+-------------------+----------------+
    | NAME     | ENCRYPTION_SCHEME | CURRENT_KEY_ID |
    +----------+-------------------+----------------+
    | db1/tab1 |                 1 |            100 |
    +----------+-------------------+----------------+
    SET GLOBAL innodb_encryption_threads=4;
    
    SET GLOBAL innodb_encrypt_tables=ON;
    
    CREATE TABLE tab1 (
       id INT PRIMARY KEY,
       str VARCHAR(50)
    ) ENCRYPTION_KEY_ID=100;
    
    SELECT NAME, ENCRYPTION_SCHEME, CURRENT_KEY_ID
        -> FROM information_schema.INNODB_TABLESPACES_ENCRYPTION
        -> WHERE NAME='db1/tab1';
    +----------+-------------------+----------------+
    | NAME     | ENCRYPTION_SCHEME | CURRENT_KEY_ID |
    +----------+-------------------+----------------+
    | db1/tab1 |                 1 |            100 |
    +----------+-------------------+----------------+
    [mariadb]
    ...
    
    # File Key Management
    plugin_load_add = file_key_management
    file_key_management_filename = /etc/mysql/encryption/keyfile.enc
    file_key_management_filekey = FILE:/etc/mysql/encryption/keyfile.key
    file_key_management_encryption_algorithm = AES_CTR
    
    # Binary Log Encryption
    encrypt_binlog=ON

    You need to set the path to the server's private key by setting the ssl_key system variable.

  • Unless you use a certificate which was signed by a trusted certificate authority (CA) you need to set the path to the certificate authority chain that can verify the server's certificate by setting either the ssl_ca or the ssl_capath system variables.

  • If you want to restrict the server to certain ciphers, then you also need to set the ssl_cipher system variable.

  • For example, to set these variables for the server, add the system variables to a relevant server option group in an option file:

    And then restart the server to make the changes persistent.

    Once the server is back up, you can check that TLS is enabled by checking the value of the have_ssl system variable. For example:

    ssl_cert
    TLS
    FLUSH SSL
    clients and utilities
    Server certificate verification
    11.4
    MariaDB 11.4
    option group
    option file
    mariadb
    option group
    option file
    mariadb
    Ssl_version
    require_secure_transport
    CREATE USER
    ALTER USER
    GRANT
    [mariadb]
    ...
    ssl_cert = /etc/my.cnf.d/certificates/server-cert.pem
    ssl_key = /etc/my.cnf.d/certificates/server-key.pem
    ssl_ca = /etc/my.cnf.d/certificates/ca.pem
    SHOW VARIABLES LIKE 'have_ssl';
    
    +---------------+-------+
    | Variable_name | Value |
    +---------------+-------+
    | have_ssl      | YES   |
    +---------------+-------+
    system variable, as long as the login is attempted from a process owned by the operating system
    root
    user account.
  • Second, if authentication fails with the unix_socket authentication plugin, then it is configured to try to use the mysql_native_password authentication plugin. However, an invalid password is initially set, so in order to authenticate this way, a password must be set with SET PASSWORD.

  • However, just using the unix_socket authentication plugin may be fine for many users, and it is very secure. You may want to try going without password authentication to see how well it works for you. Remember, the best way to keep your password safe is not to have one!

  • All user accounts, passwords, and global privileges are now stored in the mysql.global_priv table. The mysql.user table still exists and has exactly the same set of columns as before, but it’s now a view that references the mysql.global_priv table. Tools that analyze the mysql.user table should continue to work as before. From , the dedicated mariadb.sys user is created as the definer of this view. Previously, root was the definer, which resulted in privilege problems when this username was changed.

  • adds support for User Password Expiry, which is not active by default.

  • authentication plugin
    ed25519
    mysql_native_password
    mariadb-install-db
    authentication plugins
    unix_socket
    socket
    used in Debian
    SET PASSWORD
    FLUSH PRIVILEGES
    SET PASSWORD
    mariadb-install-db
    unix_socket
    mysql_native_password
    mysql_native_password
    mariadb-install-db
    mariadb-install-db
    mysql_native_password
    mariadb-install-db: User Accounts Created by Default
    mariadb-install-db
    option file
    option group
    mariadb-install-db
    option file
    mariadb-install-db
    mariadb-install-db
    option file
    unix_socket
    mysql_native_password
    Authentication from MariaDB 10 4 video tutorial
    Authentication in MariaDB 10.4 — understanding the changes (mariadb.org)
    MASTER_SSL_CIPHER

    SSL/TLS System Variables

    The system variables listed on this page relate to encrypting data during transfer between servers and clients using the Transport Layer Security (TLS) protocol. Often, the term Secure Sockets Layer (SSL) is used interchangeably with TLS, although strictly speaking the SSL protocol is the predecessor of TLS and is no longer considered secure.

    For compatibility reasons, the TLS system variables in MariaDB still use the ssl_ prefix, but MariaDB only supports its more secure successors. For more information on SSL/TLS in MariaDB, see Secure Connections Overview.

    Variables

    have_openssl

    • Description: This variable shows whether the server is linked with rather than MariaDB's bundled TLS library, which might be or .

      • I this system variable shows YES, the server is linked with OpenSSL.

      • See for more information about which libraries are used on which platforms.

    have_ssl

    • Description: This variable shows whether the server supports using to secure connections.

      • If the value is YES, then the server supports TLS, and TLS is enabled.

      • If the value is DISABLED, then the server supports TLS, but TLS is not enabled.

    ssl_ca

    • Description: Defines a path to a PEM file that should contain one or more X509 certificates for trusted Certificate Authorities (CAs) to use for . This system variable requires that you use the absolute path, not a relative path. This system variable implies the option.

      • See for more information.

    • Command line: --ssl-ca=file_name

    ssl_capath

    • Description: Defines a path to a directory that contains one or more PEM files that should each contain one X509 certificate for a trusted Certificate Authority (CA) to use for . This system variable requires that you use the absolute path, not a relative path. The directory specified by this variable needs to be run through the command. This system variable implies the option.

      • See for more information.

    • Command line: --ssl-capath=directory_name

    ssl_cert

    • Description: Defines a path to the X509 certificate file to use for . This system variable requires that you use the absolute path, not a relative path. This system variable implies the option.

    • Command line: --ssl-cert=name

    • Scope: Global

    • Dynamic: No

    ssl_cipher

    • Description: List of permitted ciphers or cipher suites to use for . Besides cipher names, if MariaDB was compiled with OpenSSL, this variable could be set to "SSLv3" or "TLSv1.2" to allow all SSLv3 or all TLSv1.2 ciphers. Note that the TLSv1.3 ciphers cannot be excluded when using OpenSSL, even by using this system variable. See for details. This system variable implies the option.

    • Command line: --ssl-cipher=name

    • Scope: Global

    ssl_crl

    • Description: Defines a path to a PEM file that should contain one or more revoked X509 certificates to use for . This system variable requires that you use the absolute path, not a relative path.

      • See for more information.

      • This variable is only valid if the server was built with OpenSSL. If the server was built with or , then this variable is not supported. See for more information about which libraries are used on which platforms.

    ssl_crlpath

    • Description: Defines a path to a directory that contains one or more PEM files that should each contain one revoked X509 certificate to use for . This system variable requires that you use the absolute path, not a relative path. The directory specified by this variable needs to be run through the command.

      • See for more information.

      • This variable is only supported if the server was built with OpenSSL. If the server was built with or , then this variable is not supported. See for more information about which libraries are used on which platforms.

    ssl_key

    • Description: Defines a path to a private key file to use for . This system variable requires that you use the absolute path, not a relative path. This system variable implies the option.

    • Command line: --ssl-key=name

    • Scope: Global

    • Dynamic: No

    ssl_passphrase

    • Description: SSL certificate key passphrase. Works similarly to the --passout/--passin openssl command-line parameters. The pass phrase value can be formatted as follows:

      • pass:password — Provide the actual password.

      • env:

    tls_version

    • Description: This system variable accepts a comma-separated list (with no whitespaces) of TLS protocol versions. A TLS protocol version will only be enabled if it is present in this list. All other TLS protocol versions will not be permitted.

      • See for more information.

    • Command line: --tls-version=value

    version_ssl_library

    • Description: The version of the library that is being used. Note that the version returned by this system variable does not always necessarily correspond to the exact version of the OpenSSL package installed on the system. OpenSSL shared libraries tend to contain interfaces for multiple versions at once to allow for backward compatibility. Therefore, if the OpenSSL package installed on the system is newer than the OpenSSL version that the MariaDB server binary was built with, then the MariaDB server binary might use one of the interfaces for an older version.

      • See for more information.

    • Scope: Global

    See Also

    • for a complete list of system variables and instructions on setting them.

    This page is licensed: CC BY-SA / Gnu FDL

    TLS and Cryptography Libraries Used by MariaDB

    When MariaDB Server is compiled with TLS and cryptography support, it is usually either statically linked with MariaDB's bundled TLS and cryptography library or dynamically linked with the system's OpenSSL library. MariaDB's bundled TLS library is either wolfSSL or yaSSL, depending on the server version.

    When a MariaDB client or client library is compiled with TLS and cryptography support, it is usually either statically linked with MariaDB's bundled TLS and cryptography library or dynamically linked with the system's TLS and cryptography library, which might be OpenSSL, GnuTLS, or Schannel.

    Checking Dynamically vs. Statically Linked

    Dynamically linking MariaDB to the system's TLS and cryptography library can often be beneficial, since this allows you to fix bugs in the system's TLS and cryptography library independently of MariaDB. For example, when information on the in was released in 2014, the bug could be mitigated by simply updating your system to use a fixed version of the library, and then restarting the MariaDB Server.

    You can verify that mysqld is in fact dynamically linked to the shared library on your system by using the command:

    If the command does not return any results, then either your mysqld is statically linked to the TLS and cryptography library on your system or your mysqld is not built with TLS and cryptography support at all.

    Checking If the Server Uses OpenSSL

    If you aren't sure whether your server is linked with or the bundled TLS library, then you can check the value of the system variable. For example:

    Checking the Server's OpenSSL Version

    If you want to see what version of your server is using, then you can check the value of the system variable. For example:

    Note that the version returned by this system variable does not always necessarily correspond to the exact version of the package installed on the system. shared libraries tend to contain interfaces for multiple versions at once to allow for backward compatibility. Therefore, if the package installed on the system is newer than the version that the MariaDB Server binary was built with, then the MariaDB Server binary might use one of the interfaces for an older version. See for more information. For example:

    FIPS Certification

    are standards published by the U.S. federal government that are used to establish requirements for various aspects of computer systems. is a set of standards for security requirements for cryptographic modules.

    This standard is relevant when discussing the TLS and cryptography libraries used by MariaDB. Some of these libraries have been certified to meet the standards set by FIPS 140-2.

    FIPS Certification by OpenSSL

    The library has a special FIPS mode that has been certified to meet the FIPS 140-2 standard. In FIPS mode, only algorithms and key sizes that meet the FIPS 140-2 standard are enabled by the library.

    MariaDB does not yet support enabling FIPS mode within the database server. See for more information. Therefore, if you would like to use OpenSSL's FIPS mode with MariaDB, then you would either need to enable FIPS mode at the kernel level or enable it via the OpenSSL configuration file, system-wide or only for the MariaDB process.. See the following resources for more information on how to do that:

    FIPS Certification by wolfSSL

    The standard version of the library has not been certified to meet the FIPS 140-2 standard, but a special version has been certified. Unfortunately, the "FIPS-ready" version of wolfSSL uses a license that is incompatible with MariaDB's license, so it cannot be used with MariaDB.

    FIPS Certification by yaSSL

    The library has not been certified to meet the FIPS 140-2 standard.

    Libraries Used by Each Platform and Package

    MariaDB Server

    MariaDB Server on Windows

    MariaDB Server is statically linked with the bundled library in and packages on Windows.

    MariaDB Server on Linux

    MariaDB Server in Binary Tarballs

    MariaDB Server is statically linked with the bundled library in on Linux.

    MariaDB Server in DEB Packages

    MariaDB Server is dynamically linked with the system's library in packages.

    See for more information.

    MariaDB Server in RPM Packages

    MariaDB Server is dynamically linked with the system's library in packages.

    MariaDB Clients and Utilities

    has been included with MariaDB Server, and the bundled and the clients and utilities are linked with it. On some platforms, and these may use a different TLS library than the one used by MariaDB Server and .

    MariaDB Clients and Utilities on Windows

    MariaDB's and are dynamically linked with the system's libraries in and packages on Windows. is still statically linked with the bundled library. <>

    MariaDB Clients and Utilities on Linux

    MariaDB Clients and Utilities in Binary Tarballs

    MariaDB's and are statically linked with the library in on Linux. is still statically linked with the bundled library. <>

    MariaDB Clients and Utilities in DEB Packages

    MariaDB's , , and are dynamically linked with the system's library in packages.

    See for more information.

    MariaDB Clients and Utilities in RPM Packages

    MariaDB's , , and are dynamically linked with the system's library in packages.

    Updating Dynamically Linked OpenSSL Libraries on Linux

    When the MariaDB Server or clients and utilities are dynamically linked to the system's library, it makes it very easy to update the libraries. The information below will show how to update these libraries for each platform.

    Updating Dynamically Linked OpenSSL Libraries with yum/dnf

    On RHEL, CentOS, Fedora, and other similar Linux distributions, it is highly recommended to update the libraries using or . Starting with RHEL 8 and Fedora 22, yum has been replaced by dnf, which is the next major version of yum. However, yum commands still work on many systems that use dnf. For example:

    Update the package by executing the following command:

    And then restart MariaDB server and any clients or applications that use the library.

    Updating Dynamically Linked OpenSSL Libraries with apt-get

    On Debian, Ubuntu, and other similar Linux distributions, it is highly recommended to recommended to update the libraries using . For example:

    First update the package cache by executing the following command:

    And then update the package by executing the following command:

    And then MariaDB server and any clients or applications that use the library.

    Updating Dynamically Linked OpenSSL Libraries with zypper

    On SLES, OpenSUSE, and other similar Linux distributions, it is highly recommended to recommended to update the libraries using . For example:

    Update the package by executing the following command:

    And then MariaDB server and any clients or applications that use the library.

    This page is licensed: CC BY-SA / Gnu FDL

    Aria Enabling Encryption

    In order to enable data-at-rest encryption for tables using the Aria storage engine, you first need to configure the server to use an Encryption Key Management plugin. Once this is done, you can enable encryption by setting the relevant system variables.

    Encrypting User-created Tables

    With tables that the user creates, you can enable encryption by setting the aria_encrypt_tables system variable to ON, then restart the Server. Once this is set, Aria automatically enables encryption on all tables you create after with the ROW_FORMAT table option set to PAGE.

    Currently, Aria does not support encryption on tables where the ROW_FORMAT table option is set to the FIXED or DYNAMIC values.

    Unlike InnoDB, Aria does not support the table option (see about that). Encryption for Aria can only be enabled globally using the system variable.

    Encrypting Existing Tables

    In cases where you have existing Aria tables that you would like to encrypt, the process is a little more complicated. Unlike InnoDB, Aria does not utilize to automatically perform encryption changes (see about that). Therefore, to encrypt existing tables, you need to identify each table that needs to be encrypted, and then you need to manually rebuild each table.

    First, set the aria_encrypt_tables system variable to encrypt new tables.

    Identify Aria tables that have the ROW_FORMAT table option set to PAGE.

    For each table in the result-set, issue an ALTER TABLE statement to rebuild the table.

    This statement causes Aria to rebuild the table using the ROW_FORMAT table option. In the process, with the new default setting, it encrypts the table when it writes to disk.

    Encrypting Internal On-disk Temporary Tables

    During the execution of queries, MariaDB routinely creates internal temporary tables. These internal temporary tables initially use the storage engine, which is entirely stored in memory. When the table size exceeds the allocation defined by the system variable, MariaDB writes the data to disk using another storage engine. If you have the set to ON, MariaDB uses Aria in writing the internal temporary tables to disk.

    Encryption for internal temporary tables is handled separately from encryption for user-created tables. To enable encryption for these tables, set the system variable to ON. Once set, all internal temporary tables that are written to disk using Aria are automatically encrypted.

    Manually Encrypting Tables

    Currently, Aria does not support manually encrypting tables through the and table options. For more information, see .

    In cases where you want to encrypt tables manually or set the specific encryption key, use .

    This page is licensed: CC BY-SA / Gnu FDL

    Enabling InnoDB Encryption

    In order to enable data-at-rest encryption for tables using the InnoDB storage engines, you first need to configure the Server to use an plugin. Once this is done, you can enable encryption by setting the system variable to encrypt the InnoDB and tablespaces and setting the system variable to encrypt the InnoDB .

    Setting these system variables enables the encryption feature for InnoDB tables on your server. To use the feature, you need to use the table option to set what encryption key you want to use and set the table option to enable encryption.

    When encrypting any InnoDB tables, the best practice is also enable encryption for the Redo Log. If you have encrypted InnoDB tables and have not encrypted the Redo Log, data written to an encrypted table may be found unencrypted in the Redo Log.

    [client-mariadb]
    ...
    ssl_ca = /etc/my.cnf.d/certificates/ca.pem
    ssl-verify-server-cert
    $ mariadb -u myuser -p -h myserver.mydomain.com \
       --ssl-ca=/etc/my.cnf.d/certificates/ca.pem \
       --ssl-verify-server-cert
    [client-mariadb]
    disable-ssl-verify-server-cert
    [client-mariadb]
    ...
    ssl_cert = /etc/my.cnf.d/certificates/client-cert.pem
    ssl_key = /etc/my.cnf.d/certificates/client-key.pem
    ssl_ca = /etc/my.cnf.d/certificates/ca.pem
    ssl-verify-server-cert
    $ mariadb -u myuser -p -h myserver.mydomain.com \
       --ssl-cert=/etc/my.cnf.d/certificates/client-cert.pem \
       --ssl-key=/etc/my.cnf.d/certificates/client-key.pem \
       --ssl-ca=/etc/my.cnf.d/certificates/ca.pem \
       --ssl-verify-server-cert
    SHOW SESSION STATUS LIKE 'Ssl_version';
    +---------------+---------------------------+
    | Variable_name | Value                     |
    +---------------+---------------------------+
    | Ssl_version   | TLSv1.3                   |
    +---------------+---------------------------+
    1 row in set (0.00 sec)
    ALTER USER 'alice'@'%' 
       REQUIRE SSL;
    ALTER USER 'alice'@'%' 
       REQUIRE CIPHER 'ECDH-RSA-AES256-SHA384';
    ALTER USER 'alice'@'%' 
       REQUIRE X509;
    ALTER USER 'alice'@'%' 
       REQUIRE SUBJECT '/CN=alice/O=My Dom, Inc./C=US/ST=Oregon/L=Portland';
    ALTER USER 'alice'@'%' 
       REQUIRE SUBJECT '/CN=alice/O=My Dom, Inc./C=US/ST=Oregon/L=Portland'
       AND ISSUER '/C=FI/ST=Somewhere/L=City/ O=Some Company/CN=Peter Parker/emailAddress=p.parker@marvel.com';
    CREATE USER 'alice'@'localhost' 
       REQUIRE NONE;
    
    CREATE USER 'alice'@'%'
       REQUIRE SUBJECT '/CN=alice/O=My Dom, Inc./C=US/ST=Oregon/L=Portland'
       AND ISSUER '/C=FI/ST=Somewhere/L=City/ O=Some Company/CN=Peter Parker/emailAddress=p.parker@marvel.com'
       AND CIPHER 'ECDHE-ECDSA-AES256-SHA384';
    CREATE USER root@localhost IDENTIFIED VIA unix_socket 
        OR mysql_native_password USING 'invalid'
    CREATE USER mysql@localhost IDENTIFIED VIA unix_socket 
        OR mysql_native_password USING 'invalid'
    $ sudo dnf install MariaDB-server
    $ mariadb -uroot
    ...
    MariaDB> set password = password("XH4VmT3_jt");
    $ sudo dnf install MariaDB-server
    $ sudo mariadb
    SELECT CONCAT(user, '@', host, ' => ', json_detailed(priv)) FROM mysql.global_priv;
    mariadb-install-db --user=mysql --datadir=/var/lib/mysql --auth-root-authentication-method=normal
    [mysql_install_db]
    auth_root_authentication_method=normal
    ALTER USER root@localhost IDENTIFIED VIA mysql_native_password 
         USING PASSWORD("verysecret")
    ENCRYPTED
    MDEV-18049
    aria_encrypt_tables
    background encryption threads
    MDEV-18971
    MEMORY
    max_heap_table_size
    aria_used_for_temp_tables
    encrypt_tmp_disk_tables
    ENCRYPTED
    ENCRYPTION_KEY_ID
    MDEV-18049
    InnoDB
    SET GLOBAL aria_encrypt_tables=ON;
    SELECT TABLE_SCHEMA, TABLE_NAME 
    FROM information_schema.TABLES 
    WHERE ENGINE='Aria' 
      AND ROW_FORMAT='PAGE'
      AND TABLE_SCHEMA != 'information_schema';
    ALTER TABLE test.aria_table ENGINE=Aria ROW_FORMAT=PAGE;
    Scope: Global
  • Dynamic: No

  • If the value is NO, then the server was not compiled with TLS support, so TLS cannot be enabled.

  • When TLS is supported, check the have_openssl system variable to determine whether the server is using OpenSSL or MariaDB's bundled TLS library. See TLS and Cryptography Libraries Used by MariaDB for more information about which libraries are used on which platforms.

  • Scope: Global

  • Dynamic: No

  • Scope: Global
  • Dynamic: No

  • Data Type: file name

  • Scope: Global

  • Dynamic: No

  • Data Type: directory name

  • Data Type: file name

  • Default Value: None

  • Dynamic: No
  • Data Type: string

  • Default Value: None

  • Command line: --ssl-crl=name
  • Scope: Global

  • Dynamic: No

  • Data Type: file name

  • Default Value: None

  • Command line: --ssl-crlpath=name

  • Scope: Global

  • Dynamic: No

  • Data Type: directory name

  • Default Value: None

  • Data Type: string

  • Default Value: None

  • var
    — Obtain the password from the environment variable
    var
    .
  • file:filename — Read the password from the specified file filename. Only the first line, up to the newline character, is read from the stream.

  • If ssl_passphrase is set, SHOW VARIABLE shows one of file:, env:, or pass: , and doesn't reveal sensitive data.

  • Command line: --ssl-passphrase=val

  • Scope: Global

  • Dynamic: No

  • Data Type: string

  • Default Value: None

  • Introduced: MariaDB 12.0

  • Scope: Global
  • Dynamic: No

  • Data Type: enumerated

  • Default Value:

    • TLSv1.1,TLSv1.2,TLSv1.3 (<= MariaDB 10.6.15, MariaDB 10.11.5, )

    • TLSv1.2,TLSv1.3 (>= MariaDB 10.6.16, MariaDB 10.11.6, and later versions)

  • Valid Values: TLSv1.0,TLSv1.1,TLSv1.2,TLSv1.3

  • Introduced:

  • Dynamic: No

  • Data Type: string

  • Default Value: None

  • OpenSSL
    wolfSSL
    yaSSL
    TLS and Cryptography Libraries Used by MariaDB
    TLS
    TLS
    ssl
    Secure Connections Overview: Certificate Authorities (CAs)
    TLS
    openssl rehash
    ssl
    Secure Connections Overview: Certificate Authorities (CAs)
    TLS
    ssl
    TLS
    Using TLSv1.3
    ssl
    TLS
    Secure Connections Overview: Certificate Revocation Lists (CRLs)
    wolfSSL
    yaSSL
    TLS and Cryptography Libraries Used by MariaDB
    TLS
    openssl rehash
    Secure Connections Overview: Certificate Revocation Lists (CRLs)
    wolfSSL
    yaSSL
    TLS and Cryptography Libraries Used by MariaDB
    TLS
    ssl
    Secure Connections Overview: TLS Protocol Versions
    TLS
    TLS and Cryptography Libraries Used by MariaDB: Checking the Server's OpenSSL Version
    Secure Connections Overview
    System Variables
    Full list of MariaDB options, system and status variables
    Enabling Encryption for Automatically Encrypted Tablespaces

    The innodb_encrypt_tables system variable controls the configuration of automatic encryption of InnoDB tables. It has the following possible values:

    Option
    Description

    OFF

    Disables table encryption.

    ON

    Enables table encryption, but allows unencrypted tables to be created.

    FORCE

    Enables table encryption, and doesn't allow unencrypted tables to be created.

    When innodb_encrypt_tables is set to ON, InnoDB tables are automatically encrypted by default. For example, the following statements create an encrypted table and confirm that it is encrypted:

    When innodb_encrypt_tables is set to ON, an unencrypted InnoDB table can be created by setting the ENCRYPTED table option to NO for the table. For example, the following statements create an unencrypted table and confirm that it is not encrypted:

    When innodb_encrypt_tables is set to FORCE, InnoDB tables are automatically encrypted by default, and unencrypted InnoDB tables can not be created. In this scenario, if you set the ENCRYPTED table option to NO for a table, then you will encounter an error. For example:

    When innodb_encrypt_tables is set to ON or FORCE, then you must ensure that innodb_encryption_threads is set to a non-zero value, so that InnoDB can perform any necessary encryption operations in the background. See background operations for more information about that. innodb_encryption_rotate_key_age must also be set to a non-zero value for the initial encryption operations to happen in the background. See disabling key rotations for more information about that.

    Enabling Encryption for Manually Encrypted Tablespaces

    If you do not want to automatically encrypt every InnoDB table, then it is possible to manually enable encryption for just the subset of InnoDB tables that you would like to encrypt. MariaDB provides the ENCRYPTED and ENCRYPTION_KEY_ID table options that can be used to manually enable encryption for specific InnoDB tables. These table options can be used with CREATE TABLE and ALTER TABLE statements. These table options can only be used with InnoDB tables that have their own InnoDB's file-per-table tablespaces, meaning that tables that were created with innodb_file_per_table=ON set.

    Table Option
    Value
    Description

    ENCRYPTED

    YES / NO / DEFAULT

    Defines whether or not to encrypt the table. DEFAULT means that the decision is based on the global setting.

    ENCRYPTION_KEY_ID

    32-bit integer

    Defines the identifier for the encryption key to use

    You can manually enable or disable encryption for a table by using the ENCRYPTED table option. If you only need to protect a subset of InnoDB tables with encryption, then it can be a good idea to manually encrypt each table that needs the extra protection, rather than encrypting all InnoDB tables globally with innodb_encrypt_tables. This allows you to balance security with speed, as it means the encryption and decryption performance overhead only applies to those tables that require the additional security.

    If a manually encrypted InnoDB table contains a FULLTEXT INDEX, then the internal table for the full-text index will not also be manually encrypted. To encrypt internal tables for InnoDB full-text indexes, you must enable automatic InnoDB encryption by setting innodb_encrypt_tables to ON or FORCE.

    You can also manually specify a encryption key for a table by using the ENCRYPTION_KEY_ID table option. This allows you to use different encryption keys for different tables. For example, you might create a table using a statement like this:

    If the ENCRYPTION_KEY_ID table option is not specified, then the table will be encrypted with the key identified by the innodb_default_encryption_key_id system variable. For example, you might create a table using a statement like this:

    In the event that you have an existing table and you want to manually enable encryption for that table, then you can do the same with an ALTER TABLE statement. For example:

    InnoDB does not permit manual encryption changes to tables in the system tablespace using ALTER TABLE. Encryption of the system tablespace can only be configured by setting the value of the innodb_encrypt_tables system variable. This means that when you want to encrypt or decrypt the system tablespace, you must also set a non-zero value for the innodb_encryption_threads system variable, and you must also set the innodb_system_rotate_key_age system variable to 1 to ensure that the system tablespace is properly encrypted or decrypted by the background threads. See MDEV-14398 for more information.

    Enabling Encryption for Temporary Tablespaces

    The innodb_encrypt_temporary_tables system variable controls the configuration of encryption for the temporary tablespace. It has the following possible values:

    Option
    Description

    OFF

    Disables temporary table encryption.

    ON

    Enables temporary table encryption.

    This system variable can be specified as a command-line argument to mysqld or it can be specified in a relevant server option group in an option file. For example:

    Enabling Encryption for the Redo Log

    InnoDB uses the Redo Log in crash recovery. By default, these events are written to file in an unencrypted state. In configuring MariaDB for data-at-rest encryption, ensure that you also enable encryption for the Redo Log.

    To encrypt the Redo Log, first stop the server process. Then, set the innodb_encrypt_log to ON in a relevant server option group in an option file. For example:

    Then, start MariaDB. When the server starts back up, it checks to recover InnoDB in the event of a crash. Once it is back online, it begins writing encrypted data to the Redo Log.

    Key rotation for the Redo Log is supported. See InnoDB Encryption Keys: Key Rotation for more information.

    See Also

    • Disabling InnoDB encryption

    This page is licensed: CC BY-SA / Gnu FDL

    Encryption Key Management
    innodb_encrypt_tables
    system
    file
    innodb_encrypt_log
    Redo Log
    ENCRYPTION_KEY_ID
    ENCRYPTED
    Heartbleed Bug
    OpenSSL
    OpenSSL
    OpenSSL
    ldd
    OpenSSL
    have_openssl
    OpenSSL
    version_ssl_library
    OpenSSL
    OpenSSL
    OpenSSL
    OpenSSL
    MDEV-15848
    Federal Information Processing Standards (FIPS)
    FIPS 140-2
    OpenSSL
    MDEV-20260
    Red Hat Enterprise Linux 7: Security Guide: Chapter 8. Federal Standards and Regulations
    Ubuntu Security Certifications Documentation: FIPS for Ubuntu 16.04 and 18.04
    OpenSSL 1.0.2, configuration file method
    OpenSSL 3.0 configuration file method
    wolfSSL
    "FIPS-ready"
    yaSSL
    wolfSSL
    MSI
    ZIP
    wolfSSL
    binary tarballs
    OpenSSL
    .deb
    Differences in MariaDB in Debian (and Ubuntu)
    OpenSSL
    .rpm
    clients and utilities
    libmysqlclient
    clients and utilities
    Schannel
    MSI
    ZIP
    libmysqlclient
    wolfSSL
    clients and utilities
    GnuTLS
    binary tarballs
    libmysqlclient
    wolfSSL
    clients and utilities
    libmysqlclient
    OpenSSL
    .deb
    Differences in MariaDB in Debian (and Ubuntu)
    clients and utilities
    libmysqlclient
    OpenSSL
    .rpm
    OpenSSL
    yum
    dnf
    apt-get
    restart
    zypper
    restart

    Amazon Web Services (AWS) Key Management Service (KMS) Encryption Plugin Setup Guide

    Overview

    MariaDB contains a robust, full instance, at-rest encryption. This feature uses a flexible plugin interface to allow actual encryption to be done using a key management approach that meets the customer's needs. MariaDB Server includes a plugin that uses the Amazon Web Services (AWS) Key Management Service (KMS) to facilitate separation of responsibilities and remote logging & auditing of key access requests.

    Rather than storing the encryption key in a local file, this plugin keeps the master key in AWS KMS. When you first start MariaDB, the AWS KMS plugin will connect to the AWS Key Management Service and ask it to generate a new key. MariaDB will store that key on-disk in an encrypted form. The key stored on-disk cannot be used to decrypt the data; rather, on each startup, MariaDB connects to AWS KMS and has the service decrypt the locally-stored key(s). The decrypted key is stored in-memory as long as the MariaDB server process is running, and that in-memory decrypted key is used to encrypt the local data.

    This guide is based on CentOS 7, using systemd with SELinux enabled. Some steps will differ if you use other operating systems or configurations.

    AWS Key Management Encryption Plugin

    Due to license incompatibilities between the MariaDB server source code and the Amazon AWS C++ SDK, we can only distribute the plugin in source code form, and not as ready-to-use binaries. See for details.

    MariaDB's requires the use of a . These plugins are responsible both for the management of encryption keys and for the actual encryption and decryption of data.

    MariaDB supports the use of . Each encryption key uses a 32-bit integer as a key identifier. If the specific plugin supports , then encryption keys can also be rotated, which creates a new version of the encryption key.

    The AWS Key Management plugin is a that uses the .

    Overview

    SET GLOBAL innodb_encryption_threads=4;
    
    SET GLOBAL innodb_encrypt_tables=ON;
    
    SET SESSION innodb_default_encryption_key_id=100;
    
    CREATE TABLE tab1 (
       id INT PRIMARY KEY,
       str VARCHAR(50)
    );
    
    SELECT NAME, ENCRYPTION_SCHEME, CURRENT_KEY_ID
    FROM information_schema.INNODB_TABLESPACES_ENCRYPTION
    WHERE NAME='db1/tab1';
    +----------+-------------------+----------------+
    | NAME     | ENCRYPTION_SCHEME | CURRENT_KEY_ID |
    +----------+-------------------+----------------+
    | db1/tab1 |                 1 |            100 |
    +----------+-------------------+----------------+
    SET GLOBAL innodb_encryption_threads=4;
    
    SET GLOBAL innodb_encrypt_tables=ON;
    
    SET SESSION innodb_default_encryption_key_id=100;
    
    CREATE TABLE tab1 (
       id INT PRIMARY KEY,
       str VARCHAR(50)
    ) ENCRYPTED=NO;
    
    SELECT NAME, ENCRYPTION_SCHEME, CURRENT_KEY_ID
    FROM information_schema.INNODB_TABLESPACES_ENCRYPTION
    WHERE NAME='db1/tab1';
    +----------+-------------------+----------------+
    | NAME     | ENCRYPTION_SCHEME | CURRENT_KEY_ID |
    +----------+-------------------+----------------+
    | db1/tab1 |                 0 |            100 |
    +----------+-------------------+----------------+
    SET GLOBAL innodb_encryption_threads=4;
    
    SET GLOBAL innodb_encrypt_tables='FORCE';
    
    SET SESSION innodb_default_encryption_key_id=100;
    
    CREATE TABLE tab1 (
       id INT PRIMARY KEY,
       str VARCHAR(50)
    ) ENCRYPTED=NO;
    ERROR 1005 (HY000): Can't create table `db1`.`tab1` (errno: 140 "Wrong create options")
    
    SHOW WARNINGS;
    +---------+------+----------------------------------------------------------------------+
    | Level   | Code | Message                                                              |
    +---------+------+----------------------------------------------------------------------+
    | Warning |  140 | InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1                     |
    | Warning |  140 | InnoDB: ENCRYPTED=NO cannot be used with innodb_encrypt_tables=FORCE |
    | Error   | 1005 | Can't create table `db1`.`tab1` (errno: 140 "Wrong create options")  |
    | Warning | 1030 | Got error 140 "Wrong create options" from storage engine InnoDB      |
    +---------+------+----------------------------------------------------------------------+
    4 rows in set (0.00 sec)
    CREATE TABLE tab1 (
       id INT PRIMARY KEY,
       str VARCHAR(50)
    ) ENCRYPTED=YES ENCRYPTION_KEY_ID=100;
    
    SELECT NAME, ENCRYPTION_SCHEME, CURRENT_KEY_ID
    FROM information_schema.INNODB_TABLESPACES_ENCRYPTION
    WHERE NAME='db1/tab1';
    +----------+-------------------+----------------+
    | NAME     | ENCRYPTION_SCHEME | CURRENT_KEY_ID |
    +----------+-------------------+----------------+
    | db1/tab1 |                 1 |            100 |
    +----------+-------------------+----------------+
    SET SESSION innodb_default_encryption_key_id=100;
    
    CREATE TABLE tab1 (
       id INT PRIMARY KEY,
       str VARCHAR(50)
    ) ENCRYPTED=YES;
    
    SELECT NAME, ENCRYPTION_SCHEME, CURRENT_KEY_ID
    FROM information_schema.INNODB_TABLESPACES_ENCRYPTION
    WHERE NAME='db1/tab1';
    +----------+-------------------+----------------+
    | NAME     | ENCRYPTION_SCHEME | CURRENT_KEY_ID |
    +----------+-------------------+----------------+
    | db1/tab1 |                 1 |            100 |
    +----------+-------------------+----------------+
    CREATE TABLE tab1 (
       id INT PRIMARY KEY,
       str VARCHAR(50)
    ) ENCRYPTED=NO;
    
    SELECT NAME, ENCRYPTION_SCHEME, CURRENT_KEY_ID
    FROM information_schema.INNODB_TABLESPACES_ENCRYPTION
    WHERE NAME='db1/tab1';
    +----------+-------------------+----------------+
    | NAME     | ENCRYPTION_SCHEME | CURRENT_KEY_ID |
    +----------+-------------------+----------------+
    | db1/tab1 |                 0 |            100 |
    +----------+-------------------+----------------+
    
    ALTER TABLE tab1
       ENCRYPTED=YES ENCRYPTION_KEY_ID=100;
    
    SELECT NAME, ENCRYPTION_SCHEME, CURRENT_KEY_ID
    FROM information_schema.INNODB_TABLESPACES_ENCRYPTION
    WHERE NAME='db1/tab1';
    +----------+-------------------+----------------+
    | NAME     | ENCRYPTION_SCHEME | CURRENT_KEY_ID |
    +----------+-------------------+----------------+
    | db1/tab1 |                 1 |            100 |
    +----------+-------------------+----------------+
    [mariadb]
    ...
    innodb_encrypt_temporary_tables=ON
    [mariadb]
    ...
    innodb_encrypt_log = ON
    $ ldd $(which mysqld) | grep -E '(libssl|libcrypto)'
            libssl.so.10 => /lib64/libssl.so.10 (0x00007f8736386000)
            libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007f8735f25000)
    SHOW GLOBAL VARIABLES LIKE 'have_openssl';
    +---------------+-------+
    | Variable_name | Value |
    +---------------+-------+
    | have_openssl  | YES   |
    +---------------+-------+
    SHOW GLOBAL VARIABLES LIKE 'version_ssl_library';
    +---------------------+---------------------------------+
    | Variable_name       | Value                           |
    +---------------------+---------------------------------+
    | version_ssl_library | OpenSSL 1.0.1e-fips 11 Feb 2013 |
    +---------------------+---------------------------------+
    $ cat /etc/redhat-release
    Red Hat Enterprise Linux Server release 7.5 (Maipo)
    $ rpm -q openssl
    openssl-1.0.2k-12.el7.x86_64
    $ mysql -u root --batch --execute="SHOW GLOBAL VARIABLES LIKE 'version_ssl_library';"
    Variable_name   Value
    version_ssl_library     OpenSSL 1.0.1e-fips 11 Feb 2013
    $ ldd $(which mysqld) | grep libcrypto
            libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007f3dd3482000)
    $ readelf -a /lib64/libcrypto.so.10 | grep SSLeay_version
      1374: 000000000006f5d0    21 FUNC    GLOBAL DEFAULT   13 SSLeay_version@libcrypto.so.10
      1375: 000000000006f5f0    21 FUNC    GLOBAL DEFAULT   13 SSLeay_version@OPENSSL_1.0.1
      1377: 000000000006f580    70 FUNC    GLOBAL DEFAULT   13 SSLeay_version@@OPENSSL_1.0.2
    sudo yum update openssl
    sudo apt update
    sudo apt-get update openssl
    sudo zypper update openssl
    innodb_encrypt_tables

    Installing the Plugin's Package

    The AWS Key Management plugin depends on the AWS SDK for C++, which uses the Apache License, Version 2.0. This license is not compatible with MariaDB Server's GPL 2.0 license, so we are not able to distribute packages that contain the AWS Key Management plugin. Therefore, the only way to currently obtain the plugin is to install it from source.

    Installing from Source

    When compiling MariaDB from source, the AWS Key Management plugin is built by default on systems that support it.

    Compilation is controlled by the -DPLUGIN_AWS_KEY_MANAGEMENT=DYNAMIC -DAWS_SDK_EXTERNAL_PROJECT=1 cmake arguments.

    The plugin uses AWS C++ SDK, which introduces the following restrictions:

    • The plugin can only be built on Windows, Linux, and macOS.

    • The plugin requires that one of the following compilers is used: gcc 4.8 or later, clang 3.3 or later, or Visual Studio 2013 or later.

    • On Unix, the libcurl development package (e.g., libcurl3-dev on Debian Jessie), the uuid development package, and openssl need to be installed.

    • You may need to use a newer version of than is provided by default in your OS.

    Installing the Plugin

    Even after the package that contains the plugin's shared library is installed on the operating system, the plugin is not actually installed by MariaDB by default. There are two methods that can be used to install the plugin with MariaDB.

    The first method can be used to install the plugin without restarting the server. You can install the plugin dynamically by executing INSTALL SONAME or INSTALL PLUGIN. For example:

    The second method can be used to tell the server to load the plugin when it starts up. The plugin can be installed this way by providing the --plugin-load or the --plugin-load-add options. This can be specified as a command-line argument to mysqld, or it can be specified in a relevant server option group in an option file. For example:

    Sign up for Amazon Web Services

    If you already have an AWS account, you can skip this section.

    1. Load.

    2. Click "Create a Free Account" and complete the steps.

    3. You'll need to enter credit card information. Charges related only to your use of the AWS KMS service should be limited to about $1/month for the single master key we will create. If you use other services, additional charges may apply. Consult AWS Cloud Pricing Principles for more information about the pricing of AWS services.

    4. You'll need to complete the AWS identity verification process.

    Create an IAM User and/or Role

    After creating an account or logging in to an existing account, follow these steps to create an IAM User or Role with restricted privileges that will use (but not administer) your master encryption key.

    If you intend to run MariaDB Server on an EC2 instance, you should create a Role (or modify an existing Role already attached to your instance). If you intend to run MariaDB Server outside of AWS, you may want to create a User.

    Creating an IAM Role

    1. Load the Identity and Access Management Console at.

    2. Click "Roles" in the left-hand sidebar

    3. Click "Create new role"

    4. Select "AWS Service Role"

    5. Click the "Select" button next to "Amazon EC2 / Allows EC2 instances to call AWS services on your behalf."

    6. Do not select any policies on the "Attach Policy" screen. Click "Next Step"

    7. Click "Next Step"

    8. Give your Role a "Role name"

    9. Click "Create role"

    Creating an IAM User

    1. Load the Identity and Access Management Console at.

    2. Click "Users" in the left-hand sidebar.

    3. Click the "Create New Users" button

    4. Enter a single User Name of your choosing. We'll use "MDBEnc" for this demonstration. Keep the "Generate an access key for each user" box checked.

    5. Click "Create".

    6. Click "Show User Security Credentials".

    7. Copy the Access Key ID and Secret Access Key. Optionally, you can click "Download Credentials". We will need these in order for local programs to interact with AWS using its API.

    8. Create a file on your computer to hold the credentials for this user. We'll use this file later. It should have this structure:

    1. Click "Close". If prompted because you did not Download Credentials, ensure that you've saved them somewhere, and click "Close".

    Create a Master Encryption Key

    Now, we'll create a master encryption key. This key can never be retrieved by any application or user. This key is used remotely to encrypt (and decrypt) the actual encryption keys that will be used by MariaDB. If this key is deleted or you lose access to it, you will be unable to use the contents of your MariaDB data directory.

    1. Click "Encryption Keys" in the left-hand sidebar.

    2. Click the "Get Started Now" button.

    3. Use the "Filter" dropdown to choose the region where you'd like to create your master key.

    4. Click the "Create Key" button.

    5. Enter an Alias and Description of your choosing.

    6. Click "Next Step".

    7. Do not check the box to make your IAM Role or IAM User a Key Administrator.

    8. Click "Next Step" again.

    9. Check the boxes to give your IAM Role and/or IAM User permissions to use this key.

    10. Click "Next Step".

    11. Click "Finish".

    You should now see your key listed in the console:

    You'll use the "Alias" you provided when you configure MariaDB later.

    We now have a Customer Master Key and an IAM user that has privileges to access it using access credentials. This is enough to begin using the AWS KMS plugin.

    Configure AWS Credentials

    There are a number of ways to give the IAM credentials to the AWS KMS plugin. The plugin supports reading credentials from all standard locations used across the various AWS API clients.

    The easiest approach is to run MariaDB Server in an EC2 instance that has an IAM Role with User access to the CMK you wish to use. You can give key access privileges to a Role already attached to your EC2 instance, or you can create a new IAM Role and attach it to an already-running EC2 instance. If you've done that, no further credentials management is required, and you do not need to create a credentials file.

    If you're not running MariaDB Server on an EC2 instance, you can also place the credentials in the MariaDB data directory. The AWS API client looks for a credentials file in the .aws subdirectory of the home directory of the user running the client process. In the case of MariaDB, its home directory is its datadir.

    1. Create a credentials file that MariaDB can read. Use the region you selected when creating the key. Master keys cannot be used across regions. For example:

    1. Change the permissions of the file so that it is owned by, and can only be read by, the mysql user:

    Configure MariaDB

    1. Create a new option file to tell MariaDB to enable encryption functionality and to use the AWS KMS plugin. Create a new file under /etc/my.cnf.d/ (or wherever your OS may have you create such files) with contents like this:

    1. Append the "Alias" value you copied above to alias/ to use as the value for the aws-key-management-master-key-id option.

    Note that you must include aws-key-management-region in your .cnf file if you are not using the us-east-1 region.

    Now, you have told MariaDB to use the AWS KMS plugin, and you've put credentials for the plugin in a location where the plugin will find them. The /etc/my.cnf.d/enable_encryption.preset file contains a set of options that enable all available encryption functionality.

    When you start MariaDB, the AWS KMS plugin will connect to the AWS Key Management Service and ask it to generate a new key. MariaDB will store that key on-disk in an encrypted form. The key stored on-disk cannot be used to decrypt the data; rather, on each startup, MariaDB must connect to AWS KMS and have the service decrypt the locally-stored key. The decrypted version is stored in-memory as long as the MariaDB server process is running, and that in-memory decrypted key is used to encrypt the local data.

    SELinux and Outbound Connections from MariaDB

    Because MariaDB needs to connect to the AWS KMS service, you must ensure that the host has outbound network connectivity over port 443 to AWS, and you must ensure that local policies allow the MariaDB server process to make those outbound connections. By default, SELinux restricts MariaDB from making such connections.

    The most simple way to cause SELinux to allow outbound HTTPS connections from MariaDB is to enable to mysql_connect_any boolean, like this:

    There are more complex alternatives that have a more granular effect, but those are beyond the scope of this document.

    Start MariaDB

    Start MariaDB using the systemctl tool:

    If you do not use systemd, you may have to start MariaDB using some other mechanism.

    You should see journal output similar to this:

    Note the several lines of output that refer explicitly to the "AWS KMS plugin". You can see that the plugin generates a "datakey", loads that data key, and then later generates and loads a second data key. The 2nd data key is used to encrypt temporary files and temporary tables.

    You can see the encrypted keys stored on-disk in the datadir:

    Note that those keys are not useful alone. They are encrypted. When MariaDB starts up, the AWS KMS plugin decrypts those keys by interacting with AWS KMS.

    For maximum security, you should start from an empty datadir and run mariadb-install-db after configuring encryption. Then you should re-import your data so that it is fully encrypted. Use sudo to run mariadb-install-db so that it finds your credentials file:

    Create Encrypted Tables

    With innodb-encrypt-tables=ON, new InnoDB tables will be encrypted by default, using the key ID set in innodb_default_encryption_key_id (default 1). With innodb-encrypt-tables=FORCE enabled, it is not possible to manually bypass encryption when creating a table.

    You can cause the AWS KMS plugin to create new encryption keys at-will by specifying a new ENCRYPTION_KEY_ID when creating a table:

    Read more about encrypting data in the Data at Rest Encryption section of the MariaDB Documentation.

    AWS KMS Plugin Option Reference

    • aws_key_management_master_key_id: AWS KMS Customer Master Key ID (ARN or alias prefixed by alias/) for master encryption key. Used to create new data keys. If not set, no new data keys will be created.

    • aws_key_management_rotate_key: Set this variable to a data key ID to perform rotation of the key to the master key given in aws_key_management_master_key_id. Specify -1 to rotate all keys.

    • aws_key_management_key_spec: Encryption algorithm used to create new keys. Allowed values are AES_128 (default) or AES_256.

    • aws_key_management_log_level: Logging for AWS API. Allowed values, in increasing verbosity, are "Off" (default), "Fatal", "Error", "Warn", "Info", "Debug", and "Trace".

    Next Steps

    For more information about advanced usage, including strategies to manage credentials, enforce separation of responsibilities, and even require 2-factor authentication to start your MariaDB server, please review Amazon Web Services (AWS) Key Management Service (KMS) Encryption Plugin Advanced Usage.

    This page is licensed: CC BY-SA / Gnu FDL

    The AWS Key Management plugin uses the Amazon Web Services (AWS) Key Management Service (KMS) to generate and store AES keys on disk, in encrypted form, using the Customer Master Key (CMK) kept in AWS KMS. When MariaDB Server starts, the plugin will decrypt the encrypted keys, using the AWS KMS "Decrypt" API function. MariaDB data will then be encrypted and decrypted using the AES key. It supports multiple encryption keys. It supports key rotation.

    Tutorials

    Tutorials related to the AWS Key Management plugin can be found at the following pages:

    • Amazon Web Services (AWS) Key Management Service (KMS) Encryption Plugin Setup Guide

    • Amazon Web Services (AWS) Key Management Service (KMS) Encryption Plugin Advanced Usage

    Preparation

    • Before you use the plugin, you need to create a Customer Master Key (CMK). Create a key using the AWS Console as described in the AMS KMS developer guide.

    • The easiest way to give the AWS key management plugin access to the key is to create an IAM Role with access to the key, and to apply that IAM Role to an EC2 instance where MariaDB Server runs.

    • Make sure that MariaDB Server runs under the correct AWS identity that has access to the above key. For example, you can store the AWS credentials in an AWS credentials file for the user who runs mysqld. More information about the credentials file can be found in the AWS CLI Getting Started Guide.

    Installing the Plugin's Package

    The AWS Key Management plugin depends on the AWS SDK for C++, which uses the Apache License, Version 2.0. This license is not compatible with MariaDB Server's , so we are not able to distribute packages that contain the AWS Key Management plugin. Therefore, the only way to currently obtain the plugin is to install it from source.

    Installing from Source

    When compiling MariaDB from source, the AWS Key Management plugin is built by default, on systems that support it.

    Compilation is controlled by the following cmake arguments:

    • -DPLUGIN_AWS_KEY_MANAGEMENT=DYNAMIC to build a loadable plugin library

    • -DAWS_SDK_EXTERNAL_PROJECT=ON to download the AWS C++ SDK code

    • -DNOT_FOR_DISTRIBUTION=ON to confirm that you know to not distribute the resulting binaries

    The plugin uses AWS C++ SDK, which introduces the following restrictions:

    • The plugin can only be built on Windows, Linux, and macOS.

    • The plugin requires that one of the following compilers is used: gcc 4.8 or later, clang 3.3 or later, Visual Studio 2013 or later.

    • On Unix, the libcurl development package (e.g. libcurl3-dev on Debian Jessie), uuid development package, and openssl need to be installed.

    • You may need to use a newer version of than is provided by default in your OS.

    You do not need to download/install the AWS C++ SDK yourself; the correct version of the SDK GitHub repository will be cloned into the build directory at build time, and only the libraries for AWS components actually needed by the key management plugin will be built, which takes much less time than building the full AWS C++ SDK.

    Building on Linux

    With all prerequisites installed, the actual build process pretty much comes down to:

    Cmake will print the following warning as part of its output. Please take it seriously and do not distribute the aws_key_management.so file to any third parties: You have linked MariaDB with Apache 2.0 libraries! You may not distribute the resulting binary. If you do, you will put yourself into a legal problem with the Free Software Foundation.

    After make succeeded you can copy the created aws_key_management.so plugin library file to the plugin directory of your actual MariaDB Server machines installation, e.g. /usr/lib64/mysql/plugin on RedHat/Fedora based systems or /usr/lib/mysql/plugin on Debian-based systems.

    Installing the Plugin

    Even after the package that contains the plugin's shared library is installed on the operating system, the plugin is not actually installed by MariaDB by default. There are two methods that can be used to install the plugin with MariaDB.

    The first method can be used to install the plugin without restarting the server. You can install the plugin dynamically by executing INSTALL SONAME or INSTALL PLUGIN. For example:

    The second method can be used to tell the server to load the plugin when it starts up. The plugin can be installed this way by providing the --plugin-load or the --plugin-load-add options. This can be specified as a command-line argument to mysqld or it can be specified in a relevant server option group in an option file. For example:

    Uninstalling the Plugin

    Before you uninstall the plugin, you should ensure that data-at-rest encryption is completely disabled, and that MariaDB no longer needs the plugin to decrypt tables or other files.

    You can uninstall the plugin dynamically by executing UNINSTALL SONAME or UNINSTALL PLUGIN. For example:

    If you installed the plugin by providing the --plugin-load or the --plugin-load-add options in a relevant server option group in an option file, then those options should be removed to prevent the plugin from being loaded the next time the server is restarted.

    Configuring the AWS Key Management Plugin

    To enable the AWS Key Management plugin, you also need to set the plugin's system variables. The aws_key_management_master_key_id system variable is the primary one to set. These system variables can be specified as command-line arguments to mysqld or they can be specified in a relevant server option group in an option file. For example:

    Once you've updated the configuration file, restart the MariaDB server to apply the changes and make the key management and encryption plugin available for use.

    Using the AWS Key Management Plugin

    Once the AWS Key Management Plugin is enabled, you can use it by creating an encrypted table:

    Now, table t will be encrypted using the encryption key generated by AWS.

    For more information on how to use encryption, see Data at Rest Encryption.

    Using Multiple Encryption Keys

    The AWS Key Management Plugin supports using multiple encryption keys. Each encryption key can be defined with a different 32-bit integer as a key identifier. If a previously unused identifier is used, then the plugin will automatically generate a new key.

    When encrypting InnoDB tables, the key that is used to encrypt tables can be changed.

    When encrypting Aria tables, the key that is used to encrypt tables cannot currently be changed.

    Key Rotation

    The AWS Key Management plugin does support key rotation. To rotate a key, set the aws_key_management_rotate_key system variable. For example, to rotate key with ID 2:

    Or to rotate all keys, set the value to -1:

    Versions

    Version
    Status
    Introduced

    1.0

    Stable

    ,

    1.0

    Beta

    1.0

    Experimental

    System Variables

    aws_key_management_key_spec

    • Description: Encryption algorithm used to create new keys

    • Commandline: --aws-key-management-key-spec=value

    • Scope: Global

    • Dynamic: No

    • Data Type: enumerated

    • Default Value: AES_128

    • Valid Values: AES_128, AES_256

    aws_key_management_log_level

    • Description: Dump log of the AWS SDK to MariaDB error log. Permitted values, in increasing verbosity, are Off (default), Fatal, Error, Warn, Info, Debug, and Trace.

    • Commandline: --aws-key-management-log-level=value

    • Scope: Global

    • Dynamic: No

    • Data Type: enumerated

    • Default Value: Off

    • Valid Values: Off, Fatal, Warn, Info, Debug and Trace

    aws_key_management_master_key_id

    • Description: AWS KMS Customer Master Key ID (ARN or alias prefixed by alias/) for the master encryption key. Used to create new data keys. If not set, no new data keys will be created.

    • Commandline: --aws-key-management-master-key-id=value

    • Scope: Global

    • Dynamic: No

    • Data Type: string

    • Default Value:

    aws_key_management_mock

    • Description: Mock AWS KMS calls (for testing). Must be enabled at compile-time.

    • Commandline: --aws-key-management-mock

    • Scope: Global

    • Dynamic: No

    • Data Type: boolean

    • Default Value: OFF

    • Valid Values: OFF, ON

    aws_key_management_region

    • Description: AWS region name, e.g us-east-1 . Default is SDK default, which is us-east-1.

    • Commandline: --aws-key-management-region=value

    • Scope: Global

    • Dynamic: No

    • Data Type: string

    • Default Value: 'us-east-1'

    aws_key_management_request_timeout

    • Description: Timeout in milliseconds for create HTTPS connection or execute AWS request. Specify 0 to use SDK default.

    • Commandline: --aws-key-management-request-timeout=value

    • Scope: Global

    • Dynamic: No

    • Data Type: integer

    • Default Value: 0

    aws_key_management_rotate_key

    • Description: Set this variable to a data key ID to perform rotation of the key to the master key given in aws_key_management_master_key_id. Specify -1 to rotate all keys.

    • Commandline: --aws-key-management-rotate-key=value

    • Scope: Global

    • Dynamic: Yes

    • Data Type: integer

    • Default Value:

    Options

    aws_key_management

    • Description: Controls how the server should treat the plugin when the server starts up.

      • Valid values are:

        • OFF - Disables the plugin without removing it from the mysql.plugins table.

        • ON - Enables the plugin. If the plugin cannot be initialized, then the server will still continue starting up, but the plugin will be disabled.

        • FORCE - Enables the plugin. If the plugin cannot be initialized, then the server will fail to start with an error.

        • FORCE_PLUS_PERMANENT - Enables the plugin. If the plugin cannot be initialized, then the server will fail to start with an error. In addition, the plugin cannot be uninstalled with or while the server is running.

      • See for more information.

    • Commandline: --aws-key-management=value

    • Data Type: enumerated

    • Default Value: ON

    • Valid Values: OFF, ON, FORCE, FORCE_PLUS_PERMANENT

    This page is licensed: CC BY-SA / Gnu FDL

    Installing the Plugin's Package
    data-at-rest encryption
    key management and encryption plugin
    multiple encryption keys
    key rotation
    key management and encryption plugin
    Amazon Web Services (AWS) Key Management Service (KMS)

    Catalogs Overview

    Catalogs are planned for an upcoming release, and don't yet appear in any current releases.

    MariaDB catalogs will be a multi-tenancy feature where a single instance MariaDB server handles multiple independent tenants (customers), who have their own users, schemas etc. See MDEV-31542 "Add multi-tenancy catalogs to MariaDB" for details.

    Background

    For hosting providers, a common solution, to drive down cost, is to have one MariaDB server support several different customers by creating one named schema for each of them.

    This has however a lot of limitations:

    • The user cannot have exactly the same schema(s) on the cloud as they have on premise.

    • The user cannot use multiple schemas.

    • The user cannot take a backup of all their data (not even with ). This is because the ‘mysql’ schema, which includes users, stored procedures etc. cannot be copied as its data is shared among all server users.

    • The user cannot access the or .

    The other option is to have a MariaDB container for each tenant. The problem with this is that, because of the memory needed per container, one can only have a very limited number of tenants per computer.

    The suggested solution is to solve all of the above and thus create a better multi-tenant database is to add support for catalogs to MariaDB.

    The following picture shows the change:

    By each user having their own catalog, they will get very close to the same user experience as if they would have the MariaDB server for themselves.

    Catalogs make it possible for hosting providers to have 10-100x more 'not that active' database users on a server compared to having a container or MariaDB server per customer (which limits a 192G server to about 100 customers with a 1G InnoDB buffer each).

    User Experience With Catalogs

    • Each user is assigned one catalog. The user can specify their catalog in their my.cnf file or as an argument to clients or when connecting to MariaDB server.

    • Users can of all their tables (including the ‘mysql’ database) and apply it on their own on premise MariaDB or to another ‘MariaDB catalog’ to duplicate their setup.

    • Each catalog has its own privilege system. This allows a MariaDB admin to create users independently in their catalog to users in any other catalog. This also implies that the catalog has to be part of the connect information as otherwise the server does not know which user table to use.

    For the end user, the MariaDB server will act as a normal a standalone server, with the following differences:

    • When connecting to the server, a normal user must specify the catalog. If the connector software does not support catalogs, then the catalog should be specified in the database string. If the catalog is not specified, the 'def' catalog is assumed.

    • and can be configured to only be used with the catalog directory or a directory in it.

    • command is only for the 'catalog root users'

    • Replication (MASTER and SLAVE commands) are only for 'catalog root users'

    New 'catalog root user'

    • The 'def' catalog is reserved to store permissions for 'catalog root users', which can access any catalog. * These are meant for admin users that need to do tasks like shutdown, upgrade, create/drop catalogs, managing primaries and replicas etc.

    • Only the ‘catalog root user’ can change to another catalog with ‘set catalog catalog_name’.

    • A normal user can do ‘set catalog current-catalog’. This will be needed to be able to execute a that includes this command.

    New Storage Layout

    MariaDB server will be able to run either on 'original mode', where the data layout is exactly as it was before, or on 'catalog' mode, with a new data layout:

    When running with --use-catalogs, it will create the following new data structure:

    • data_directory/

      • engine system data files

      • system files

      • replication files

    The disk structure when not using catalogs is:

    • data_directory/

      • engine system data files

      • system files

      • replication files

    The above shows:

    • There is a 'mariadb' catalog that stores admin users that can access all catalogs, shutdown servers, create new catalogs etc. The 'system root' user uses this when connecting.

    • Each catalog has their own users, privilege tables, databases, error log and general logs

    The MariaDB server will automatically start in catalog mode if it notices the new directory structure.

    Catalog SQL Commands/Functions

    • ;

    • CREATE CATALOG

    • ALTER CATALOG

    Changes Needed in MariaDB Codebase

    Client changes:

    • Add --catalog option to all standard MariaDB clients

    • Add support for looping over all existing catalogs to:

    Changes to :

    • Allow one to create multiple catalogs at once: -–catalogs=”catalog1,catalog2”

    • Init MariaDB with catalog support: —use-catalogs

    Changes to mariadb (mysql client):

    • Add support for 'USE CATALOG xxx’' (and later 'use database xxx').

    Changes to mysql-test-run:

    • Add support of running tests with catalogs (normal tests are run without catalogs)

    Changes to MariaDB server (See ):

    • Add support for 'catalog' in the connection string. For old clients, the user can specify the catalog as part of the database. If catalog is not specified, the 'def' catalog (like now) is assumed.

    • Add CATALOG() function that returns the current catalog.

    • Add ‘USE CATALOG xxx’

    • Add 'USE DATABASE xxx'

    Notes:

    • The storage handler calls will probably not be changed. The storage engine will get the catalog name as part of the database name (catalog/database).

    • We don't need a 'catalog' column for tables in the 'mysql' schema (like mysql.proc) as these are stored per catalog.

    Some Implementation Ideas

    • Instead of sending a catalog string to function, use a pointer to the global catalog object. Do the same later for databases. This allows use to precompute things like 'filename' for catalogs and databases and we don't have to do this for every table open. It also allows us to later support logging information at a catalog and database level.

    • Don't take a MDL lock for the catalog for each table. The metadata lock for the catalog will be taken when a user logs in or changes catalog.

    • Add system variables ‘current_catalog’ and ‘current_database’ and allow users to change these.

    • Add support for ‘catalog ports’ that are connected to catalog. This allows users to connect to a specific catalog from any client software.

    Limitations (in addition to limitations listed in “User experience with catalogs”)

    • Database names cannot contain ‘.’ when connecting from clients without the new catalog connect option.

    • One cannot refer to other catalogs in triggers, stored procedures, events etc. This is because a transaction cannot span catalogs.

    • Only the catalog root user can use mariadb-backup. This is a normal restriction as one has to be system root to be able to use mariadb-backup.

    • Events are global (to save resources). Catalog users can enable/disable events for their catalog.

    Stage 2 (not in first release)

    • Support usage statistics per catalog and whole server (the last for the ‘catalog root user’). This allows the DBA to see the number of queries, type of queries etc. Some ‘system’ and ‘global innodb’ statistics will only be shown globally (number of open files, number of sync calls etc).

    • Support a my.cnf file in each catalog directory to handle catalog (customer) unique defaults.

    • Add quotas per catalog for tables and temporary files.

    • Add more support to limit users from overusing resources (cpu, tables, databases, number of connections etc)

    Stage 3

    • Allow users to manage their own replication stream (maybe?).

    • Allow users to have different options for the S3 engine

    • More things will be added later.

    Appendix

    Legacy Connector Support

    SQLALchemy test:

    The following tests ensured that inside the server (mysql_change_db), the “catalog/test” was picked up as the database.

    PHP PDO test:

    PHP mysqli test:

    Nodejs test:

    (need to map out a few other connectors here to make sure it’s supported well in this form).

    Ref:

    Migration of Existing MariaDB Original Mode to the New Catalog Layout

    As shared hosting services have a naming scheme from user/schema to database name in MariaDB, to provide a migration to the new catalog layout, the following steps will be required:

    • Use to dump the original data

    • On the new server execute:

    • mariadb –catalog catalog_name < dump_file

    This is needed as InnoDB needs to know where the new files are located.

    Migration of One Catalog User to Another MariaDB Server

    Create a migration tool set / procedure that does the following

    • Execute for all tables in a catalog.

    • Take a copy of the catalog directory

    • Copy the data to a new catalog directory to the new server

    • Run on each InnoDB table

    Note that for partitioned tables the process will be a bit more complex, see above link.

    This procedure will be a bit easier after an in-the-works patch for InnoDB related to IMPORT will be pushed. (Should happen before we start on the catalog project)

    Other Things

    • Drizzle’s default catalog was called "local". MariaDB’s default will be called ‘def’, as this is what we already have as the default catalog in information_schema, in current connectors and other places.

    • CONNECT engine will need testing against catalogs and maybe a small code change to support them. It could also be a way to join from one catalog to another.

    See Also

    • Add multi-tenancy catalogs to MariaDB

    This page is licensed: CC BY-SA / Gnu FDL

    INSTALL SONAME 'aws_key_management';
    [mariadb]
    ...
    plugin_load_add = aws_key_management
    [default]
    aws_access_key_id = AKIAIG6IZ6TKF52FVV5A
    aws_secret_access_key = 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
    $ cat /var/lib/mysql/.aws/credentials
    [default]
    aws_access_key_id = AKIAIG6IZ6TKF52FVV5A
    aws_secret_access_key = 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
    region = us-east-1
    chown mysql /var/lib/mysql/.aws/credentials
    chmod 600 /var/lib/mysql/.aws/credentials
    [mariadb]
    plugin_load_add = aws_key_management
    aws-key-management = FORCE_PLUS_PERMANENT
    aws-key-management-master-key-id = alias/mariadb-encryption
    aws-key-management-region = us-east-1
    !include /etc/my.cnf.d/enable_encryption.preset
    setsebool -P mysql_connect_any 1
    systemctl start mariadb
    # journalctl --no-pager -o cat -u mariadb.service
    
    [Note] /usr/sbin/mysqld (mysqld 10.1.9-MariaDB-enterprise-log) starting as process 19831 ...
    [Note] AWS KMS plugin: generated encrypted datakey for key id=1, version=1
    [Note] AWS KMS plugin: loaded key 1, version 1, key length 128 bit
    [Note] InnoDB: Using mutexes to ref count buffer pool pages
    [Note] InnoDB: The InnoDB memory heap is disabled
    [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    [Note] InnoDB: Memory barrier is not used
    [Note] InnoDB: Compressed tables use zlib 1.2.7
    [Note] InnoDB: Using CPU crc32 instructions
    [Note] InnoDB: Initializing buffer pool, size = 2.0G
    [Note] InnoDB: Completed initialization of buffer pool
    [Note] InnoDB: Highest supported file format is Barracuda.
    [Note] InnoDB: 128 rollback segment(s) are active.
    [Note] InnoDB: Waiting for purge to start
    [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.26-74.0 started; log sequence number 1616819
    [Note] InnoDB: Dumping buffer pool(s) not yet started
    [Note] Plugin 'FEEDBACK' is disabled.
    [Note] AWS KMS plugin: generated encrypted datakey for key id=2, version=1
    [Note] AWS KMS plugin: loaded key 2, version 1, key length 128 bit
    [Note] Using encryption key id 2 for temporary files
    [Note] Server socket created on IP: '::'.
    [Note] Reading of all Master_info entries succeded
    [Note] Added new Master_info '' to hash table
    [Note] /usr/sbin/mysqld: ready for connections.
    # ls -l /var/lib/mysql/aws*
    -rw-rw----. 1 mysql mysql 188 Feb 25 18:55 /var/lib/mysql/aws-kms-key.1.1
    -rw-rw----. 1 mysql mysql 188 Feb 25 18:55 /var/lib/mysql/aws-kms-key.2.1
    # sudo -u mysql mariadb-install-db
    Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...
    2016-02-25 23:16:06 139731553998976 [Note] /usr/sbin/mysqld (mysqld 10.1.11-MariaDB-enterprise-log) starting as process 39551 ...
    2016-02-25 23:16:07 139731553998976 [Note] AWS KMS plugin: generated encrypted datakey for key id=1, version=1
    2016-02-25 23:16:07 139731553998976 [Note] AWS KMS plugin: loaded key 1, version 1, key length 128 bit
    ...
    MariaDB [test]> CREATE TABLE t1 (id serial, v VARCHAR(32)) ENCRYPTION_KEY_ID=3;
    Query OK, 0 rows affected (0.91 sec)
    [Note] AWS KMS plugin: generated encrypted datakey for key id=3, version=1
    [Note] AWS KMS plugin: loaded key 3, version 1, key length 128 bit
    # ls -l /var/lib/mysql/aws*
    -rw-rw----. 1 mysql mysql 188 Feb 25 18:55 /var/lib/mysql/aws-kms-key.1.1
    -rw-rw----. 1 mysql mysql 188 Feb 25 18:55 /var/lib/mysql/aws-kms-key.2.1
    -rw-rw----. 1 mysql mysql 188 Feb 25 19:10 /var/lib/mysql/aws-kms-key.3.1
    # clone the MariaDB Server source code repository
    git clone https://github.com/MariaDB/server.git
    cd server
    
    # prepare the build
    mkdir _build
    cd _build
    cmake .. -DNOT_FOR_DISTRIBUTION=ON \
      -DPLUGIN_AWS_KEY_MANAGEMENT=DYNAMIC \
      -DAWS_SDK_EXTERNAL_PROJECT=1
    
    # build the plugin only
    cd plugin/aws_key_management
    make
    INSTALL SONAME 'aws_key_management';
    [mariadb]
    ...
    plugin_load_add = aws_key_management
    UNINSTALL SONAME 'aws_key_management';
    [mariadb]
    ...
    aws_key_management_master_key_id=alias/<your key's alias>
    CREATE TABLE t (i INT) ENGINE=InnoDB ENCRYPTED=YES
    SET GLOBAL aws_key_management_rotate_key=2;
    SET GLOBAL aws_key_management_rotate_key=-1;
    cmake
    If the user is using applications that don’t yet support catalogs, they can specify the catalog as part of the database when connecting to the server ('catalog.database') or by connecting to a specific port that is associated with a catalog.
  • After logging in, a normal user can only see the objects (databases, tables, users etc) from their database. They cannot access other catalogs or change catalogs.

  • A normal user cannot change the active catalog with a command. They need to logout from the current catalog and login to another.

  • Errors from background task (like write error) will be logged into the system error log, not the catalog error log.

  • SHOW STATUS will show status data for the whole server, not only for the active catalog.

  • The server will handle legacy applications by extending the default database in the connection to contain the catalog in the form “catalog/database”. See Appendix for details.

  • Tables that are only read from the ‘def.mysql’ schema:

    • plugin

    • help_* tables

    • time_zone* tables

    • (replication state)

    • (innodb internal)

    • (federated)

    • (innodb internal)

    • (udf)

  • general.log

  • error.log

  • mariadb/

    • mysql/

    • privilege tables

  • catalog1

  • general.log

  • error.log

  • mysql/

    • privilege tables

  • database1/

    • tables for database1

  • database2/

    • tables for database2

  • catalog2/

    • general.log

    • error.log

  • mysql/

    • privilege tables

  • database1/

    • tables for database1

  • database2/

    • tables for database2

  • general.log

  • error.log

  • mysql/

    • privilege tables

  • database1/

    • tables for database1

  • database2/

    • tables for database2

  • SHOW CATALOGS (and also information_schema.catalogs)
  • SHOW CREATE CATALOG catalog_name;

  • SELECT CATALOG();

  • mariadb-upgrade

    Create a global CATALOG object to hold all information related to the catalog.

  • Add the current catalog to the 'thd' object.

  • Add catalog argument to all functions that take 'database' as an argument.

  • Add SHOW CATALOGS and information_schema.catalogs

  • Move all relevant global variables (users, privileges, mdl-locks(?), open log files) to be stored in the CATALOG structure.

  • Add 'catalog privilege', for ‘catalog super users’ to allow them to access data in any catalog.

  • Add support for accessing tables with 'catalog.schema.table' (needed for catalog super users).

  • For normal users, only show processes for the current catalog in 'show processlist'.

  • Add loops over all catalogs for information schema for the 'catalog root user'.

  • Update performance schema to take catalogs into account.

  • Work with external connectors to get them to support connecting with a catalog.

  • Check/update all storage engines to ensure they work also with catalogs.

  • Support 'drop catalog'. (This is in Stage 2 as there may be some issues to drop already active CATALOG objects)

  • Add optional catalog support to the S3 engine

  • More things will be added later.

  • mariadb-dump
    general
    error log
    mariadb-dump
    LOAD DATA INFILE
    SELECT … INTO OUTFILE
    SHUTDOWN
    mariadb-dump
    mariadb-install-db
    USE CATALOG catalog_name
    DROP CATALOG
    mariadb-dump
    mariadb-backup
    mariadb-install-db
    MDEV-31542
    connection.md#handshake-response-packet
    mariadb-dump
    mariadb-install-db –catalogs=’catalog_name’
    FLUSH TABLES FOR EXPORT
    ALTER TABLE ... IMPORT TABLESPACE
    MDEV-31542
    moving-to-catalogs
    cmake
    UNINSTALL SONAME
    UNINSTALL PLUGIN
    Plugin Overview: Configuring Plugin Activation at Server Startup
    MariaDB 10.1.13

    File Key Management Encryption Plugin

    MariaDB's data-at-rest encryption requires the use of a key management and encryption plugin. These plugins are responsible both for the management of encryption keys and for the actual encryption and decryption of data.

    MariaDB supports the use of multiple encryption keys. Each encryption key uses a 32-bit integer as a key identifier. If the specific plugin supports key rotation, then encryption keys can also be rotated, which creates a new version of the encryption key.

    The File Key Management plugin that ships with MariaDB is a key management and encryption plugin that reads encryption keys from a plain-text file.

    Overview

    The File Key Management plugin is the key management and encryption plugin for users who want to use data-at-rest encryption. Some of the plugin's primary features are:

    • It reads encryption keys from a plain-text key file.

    • As an extra protection mechanism, the plain-text key file can be encrypted.

    • It supports multiple encryption keys.

    • It supports key rotation with MariaDB Enterprise Server from MariaDB Enterprise Server 11.8.

    It can also serve as an example and as a starting point when developing a key management and encryption plugin with the .

    Installing the File Key Management Plugin's Package

    The File Key Management plugin is included in MariaDB packages as the file_key_management.so or file_key_management.dll shared library. The shared library is in the main server package, so no additional package installations are necessary. The plug-in must be installed into MariaDB however as follows.

    Installing the Plugin

    Although the plugin's shared library is distributed with MariaDB by default, the plugin is not actually installed by MariaDB by default. The plugin can be installed by providing the or the options. This can be specified as a command-line argument to or it can be specified in a relevant server in an . For example:

    Uninstalling the Plugin

    Before you uninstall the plugin, you should ensure that is completely disabled, and that MariaDB no longer needs the plugin to decrypt tables or other files.

    You can uninstall the plugin dynamically by executing or . For example:

    If you installed the plugin by providing the or the options in a relevant server in an , then those options should be removed to prevent the plugin from being loaded the next time the server is restarted.

    Creating the Key File

    In order to encrypt your tables with encryption keys using the File Key Management plugin, create the file containing the encryption keys. File name and location don't matter; see in the following what configuration is needed.

    For each encryption key, the file contains these options, separated by a semicolon:

    • The key identifier (format: 32-bit integer)

    • The key version (optional, and only available as of Enterprise Server 11.8)

    • The key itself (format: hex-encoded)

    Entries look like this:

    You can also optionally encrypt the key file to make it less accessible from the file system. That is explained further in the section below.

    The File Key Management plugin uses to encrypt data. It supports 128-bit, 192-bit, and 256-bit encryption keys, just like the plugin does.

    Generate random encryption keys using the command. To create a random 256-bit (32-byte) encryption key, run the following command:

    The key file needs to have a key identifier for each encryption key added to the beginning of each line. Key identifiers do not have to be contiguous. For example, to append three new encryption keys to a new key file, issue this command:

    The resulting key file looks like this:

    The key identifiers give you a way to reference the encryption keys from MariaDB. In the example above, you could reference these encryption keys using the key identifiers 1, 2 or 100 with the table option or with system variables such as . You do not necessarily need multiple encryption keys; an encryption key with the key identifier 1 is the only mandatory one.

    If the key file is left unencrypted, the File Key Management plugin only requires the system variable to be configured.

    This system variable can be specified as a command-line argument to mariadbd , or it can be specified in a server of an , like this:

    Encrypting the Key File

    This step is optional, but highly recommended.

    If you use an unencrypted key file, keys are stored in plain text on your system, posing a security risk. It's recommended to encrypt the key file, with these hints in mind:

    • MariaDB only supports the mode of .

    • The encryption key size can be 128-bits, 192-bits, or 256-bits.

    • The encryption key is created from the hash of the encryption password.

    • The encryption password has a maximum length of 256 characters.

    Generate a random encryption password using the command. To create a random 256 character encryption password, execute the following:

    Encrypt the key file using the command. To encrypt the key file with the encryption password created in the previous step, execute, for example, one of the following commands:

    The resulting keys.enc file is the encrypted version of keys.txt file. Delete the unencrypted key file.

    Having the key file encrypted requires both the and the system variables to be configured.

    The file_key_management_filekey variable can be provided in two forms:

    • As a plain-text encryption password. This is not recommended, since the plain-text encryption password would be visible in the output of the statement.

    • Prefixed with FILE:, it can be a path to a file that contains the plain-text encryption password.

    These variables can be specified as command-line arguments to mariadbd, or they can be specified in a relevant server in an :

    Choosing an Encryption Algorithm

    The File Key Management plugin currently supports two encryption algorithms for encrypting data: AES_CBC and AES_CTR. Both of these algorithms use in different modes. AES uses 128-bit blocks, and supports 128-bit, 192-bit, and 256-bit keys. The modes are:

    • The AES_CBC mode uses AES in the mode.

    • The AES_CTR mode uses AES in two slightly different modes in different contexts. When encrypting tablespace pages (such as pages in InnoDB, XtraDB, and Aria tables), it uses AES in the mode. When encrypting temporary files (where the cipher text is allowed to be larger than the plain text), it uses AES in the authenticated .

    The recommended algorithm is AES_CTR, but this algorithm is only available when MariaDB is built with . If the server is built with then this algorithm is not available. See for more information about which libraries are used on which platforms.

    Configuring the Encryption Algorithm

    The encryption algorithm can be configured by setting the system variable.

    This system variable can be set to one of the following values:

    System Variable Value
    Description

    This system variable can be specified as command-line arguments to mariadbd, or it can be specified in a relevant server in an . For example:

    Note that the option prefix is specified. This option prefix is used in case the plugin hasn't been installed yet.

    Note that this variable does not affect the algorithm that MariaDB uses to decrypt the key file. This variable only affects the encryption algorithm that MariaDB uses to encrypt and decrypt data. The only algorithm that MariaDB currently supports to encrypt the key file is mode of .

    Using the File Key Management Plugin

    Once the File Key Management Plugin is enabled, you can use it by creating an encrypted table:

    Now, table t will be encrypted using the encryption key from the key file. For more information on how to use encryption, see .

    Using Multiple Encryption Keys

    The File Key Management Plugin supports . Each encryption key can be defined with a different 32-bit integer as a key identifier.

    When , the key that is used to encrypt tables . When , the key that is used to encrypt tables .

    Key Rotation

    The plugin supports key rotation and allows an optional key version in the key file. The keys can be rotated using the FLUSH FILE_KEY_MANAGEMENT_KEYS statement, without needing to restart the server. The plugin remains compatible with old key file format, and when version is not specified, it defaults to version 1.

    Generation of New Key Versions

    How would new key versions be generated?

    The plugin doesn't generate any encryption keys itself, and it doesn't have a backend KMS to generate encryption keys for it either.

    Any encryption keys need to be generated by the user with external tools, such as OpenSSL. For example:

    Keys need to be manually saved to the key file. See .

    The format of the key file is simplistic. It stores encryption keys in a plain-text file.

    Versions

    Version
    Status
    Introduced

    System Variables

    file_key_management_encryption_algorithm

    • This system variable is used to determine which algorithm the plugin will use to encrypt data.

      • The recommended algorithm is AES_CTR, but this algorithm is only available when MariaDB is built with . If the server is built with then this algorithm is not available. See for more information about which libraries are used on which platforms.

    • Command line: --file-key-management-encryption-algorithm=value

    file_key_management_digest

    • Specifies the digest function to use in key derivation of the key used for decrypting the key file.

    • Command line: --file-key-management-digest=value

    • Scope: Global

    • Dynamic: No

    file_key_management_filekey

    • Used to determine the encryption password that is used to decrypt the key file defined by .

      • If this system variable's value is prefixed with FILE:, then it is interpreted as a path to a file that contains the plain-text encryption password.

      • If this system variable's value is not prefixed with FILE:, then it is interpreted as the plain-text encryption password. However, this is not recommended.

    file_key_management_filename

    • Used to determine the path to the file that contains the encryption keys. If is set, this file can be encrypted with mode of .

    • Command line: --file-key-management-filename=value

    • Scope: Global

    file_key_management_use_pbkdf2

    • Specifies whether pbkdf2 is used in key derivation, and if so, how many iterations.

    • Command line: --file-key-management-use-pbkdf2=number

    • Scope: Global

    • Dynamic: No

    Options

    file_key_management

    • Controls how the server should treat the plugin when the server starts up.

      • Valid values are:

        • OFF - Disables the plugin without removing it from the table.

    This page is licensed: CC BY-SA / Gnu FDL

    Secure Connections Overview

    Prior to , by default, MariaDB transmits data between the server and clients without encrypting it. This is generally acceptable when the server and client run on the same host or in networks where security is guaranteed through other means. However, in cases where the server and client exist on separate networks or they are in a high-risk network, the lack of encryption does introduce security concerns as a malicious actor could potentially eavesdrop on the traffic as it is sent over the network between them.

    To mitigate this concern, MariaDB allows you to encrypt data in transit between the server and clients using the Transport Layer Security (TLS) protocol. TLS was formerly known as Secure Socket Layer (SSL), but strictly speaking the SSL protocol is a predecessor to TLS and, that version of the protocol is now considered insecure. The documentation still uses the term SSL often and for compatibility reasons TLS-related server system and status variables still use the prefix ssl_, but internally, MariaDB only supports its secure successors.

    In [1]: from sqlalchemy.engine import make_url
    In [2]: u = make_url('mariadb+mariadbconnector://app_user:Password123!@127.0.0.1:3306/catalog/company')
    In [3]: u.database
    Out[3]: 'catalog/company'
    $ php -r '$db = new \PDO("mysql:host=localhost;user=dan;dbname=catalog/test;charset=utf8mb4;unix_socket=/tmp/build-mariadb-server-10.4.sock");'
    php -r '$dbcon = mysqli_connect("localhost","dan","nopass","catalog/test",3306,"/tmp/build-mariadb-server-10.4.sock");'
    var mysql = require('mysql')
    var con = mysql.createConnection({
      socketPath: "/tmp/build-mariadb-server-10.4.sock",
      user: "dan",
      password: "yourpassword",
      database: "catalog/test",
    })
    con.connect(function(err) {
      if (err) throw err;
      console.log("Connected!");
    })
    gtid_slave_pos
    innodb_index_stats
    servers
    transaction_registry
    func
    performance_schema
    It supports two different algorithms for encrypting data.

    The File Key Management plugin does not support key rotation.

    Scope: Global

  • Dynamic: No

  • Data Type: enumerated

  • Default Value: AES_CBC

  • Valid Values: AES_CBC, AES_CTR

  • Data type: enumerated

  • Default value: sha1

  • Valid values: sha1, sha224, sha256, sha384, sha512

  • Available from MariaDB 12.0

  • The encryption password has a max length of 256 characters.

  • The only algorithm that MariaDB currently supports when decrypting the key file is Cipher Block Chaining (CBC) mode of Advanced Encryption Standard (AES). The encryption key size can be 128-bits, 192-bits, or 256-bits. The encryption key is calculated by taking a SHA-1 hash of the encryption password. Instead of SHA-1, SHA-2 can be used as well.

  • Command line: --file-key-management-filekey=value

  • Scope: Global

  • Dynamic: No

  • Data type: string

  • Default value: (empty)

  • Dynamic: No
  • Data type: string

  • Default value: (empty)

  • Data type: numeric

  • Default value: 0

  • Valid values: integers ≥ 0 (reasonable value: 600000 for sha256, less for sha512)

  • Available from MariaDB 12.0

  • ON - Enables the plugin. If the plugin cannot be initialized, then the server will still continue starting up, but the plugin will be disabled.
  • FORCE - Enables the plugin. If the plugin cannot be initialized, then the server will fail to start with an error.

  • FORCE_PLUS_PERMANENT - Enables the plugin. If the plugin cannot be initialized, then the server will fail to start with an error. In addition, the plugin cannot be uninstalled with UNINSTALL SONAME or UNINSTALL PLUGIN while the server is running.

  • See Plugin Overview: Configuring Plugin Activation at Server Startup for more information.

  • Command line: --file-key-management=value

  • Data type: enumerated

  • Default value: ON

  • Valid values: OFF, ON, FORCE, FORCE_PLUS_PERMANENT

  • AES_CBC

    Data is encrypted using AES in the Cipher Block Chaining (CBC) mode. This is the default value.

    AES_CTR

    Data is encrypted using AES either in the Counter (CTR) mode or in the authenticated Galois/Counter Mode (GCM) mode, depending on context. This is only supported in some builds. See the previous section for more information.

    1.0

    Stable

    From MariaDB 10.1.18

    --plugin-load
    --plugin-load-add
    mariadbd
    option group
    option file
    data-at-rest encryption
    UNINSTALL SONAME
    UNINSTALL PLUGIN
    --plugin-load
    --plugin-load-add
    option group
    option file
    Advanced Encryption Standard (AES)
    openssl rand
    ENCRYPTION_KEY_ID
    innodb_default_encryption_key_id
    file_key_management_filename
    option group
    option file
    Cipher Block Chaining (CBC)
    Advanced Encryption Standard (AES)
    SHA-1
    openssl rand
    openssl enc
    file_key_management_filename
    file_key_management_filekey
    SHOW VARIABLES
    option group
    option file
    Advanced Encryption Standard (AES)
    Cipher Block Chaining (CBC)
    Counter (CTR)
    Galois/Counter Mode (GCM)
    OpenSSL
    wolfSSL
    TLS and Cryptography Libraries Used by MariaDB
    file_key_management_encryption_algorithm
    option group
    option file
    loose
    Cipher Block Chaining (CBC)
    Advanced Encryption Standard (AES)
    Data at Rest Encryption
    using multiple encryption keys
    encrypting InnoDB tables
    can be changed
    encrypting Aria tables
    cannot currently be changed
    this section
    OpenSSL
    wolfSSL
    TLS and Cryptography Libraries Used by MariaDB
    file_key_management_filename
    file_key_management_filekey
    Cipher Block Chaining (CBC)
    Advanced Encryption Standard (AES)
    mysql.plugins
    Checking MariaDB Server for TLS Support

    In order for MariaDB Server to use TLS, it needs to be compiled with TLS support. All MariaDB packages distributed by MariaDB Foundation and MariaDB Corporation are compiled with TLS support.

    If you aren't sure whether your MariaDB Server binary was compiled with TLS support, then you can check the value of the have_ssl system variable. For example:

    The possible values are:

    • If it is DISABLED, then the server was compiled with TLS support, but TLS is not enabled.

    • If it is YES, then the server was compiled with TLS support, and TLS is enabled.

    • If it is NO, then the server was not compiled with TLS support.

    TLS Libraries

    When MariaDB is compiled with TLS and cryptography support, it is usually either statically linked with MariaDB's bundled TLS and cryptography library, which might be wolfSSL or yaSSL, or dynamically linked with the system's TLS and cryptography library, which might be OpenSSL, GnuTLS, or Schannel.

    See TLS and Cryptography Libraries Used by MariaDB for more information about which libraries are used on which platforms.

    TLS Protocol Versions

    There are 4 versions of the TLS protocol:

    • TLSv1.0

    • TLSv1.1

    • TLSv1.2

    • TLSv1.3

    Enabling Specific TLS Protocol Versions

    In some cases, it might make sense to only enable specific TLS protocol versions. For example, it would make sense if your organization has to comply with a specific security standard. It would also make sense if a vulnerability is found in a specific TLS protocol version, and you would like to ensure that your server does not use the vulnerable protocol version.

    The PCI DSS v3.2 recommends using a minimum protocol version of TLSv1.2.

    On the server side, users can enable specific TLS protocol versions by setting the tls_version system variable. This system variable accepts a comma-separated list of TLS protocol versions. A TLS protocol version will only be enabled if it is present in this list. All other TLS protocol versions will not be permitted. This system variable can be specified as a command-line argument to mariadbd or it can be specified in a relevant server option group in an option file. For example:

    You can check which TLS protocol versions are enabled on a server by executing SHOW GLOBAL VARIABLES. For example:

    On the client side, users can enable specific TLS protocol versions by setting the --tls-version option. This option accepts a comma-separated list of TLS protocol versions. A TLS protocol version will only be enabled if it is present in this list. All other TLS protocol versions will not be permitted. For example, to specify this option in a relevant client option group in an option file, you could set the following:

    Or if you wanted to specify it on the command-line with the mariadb client, then you could execute something like this:

    TLS Protocol Version Support

    The TLS protocol versions that are supported depend on the underlying TLS library used by the specific MariaDB binary.

    TLS Library
    Supported TLS Protocol Versions

    openSSL

    TLSv1, TLSv1.1, TLSv1.2, TLSv1.3

    wolfSSL

    TLSv1, TLSv1.1, TLSv1.2, TLSv1.3

    yaSSL

    TLSv1, TLSv1.1

    Schannel

    TLSv1, TLSv1.1, TLSv1.2

    GnuTLS

    TLSv1, TLSv1.1, TLSv1.2, TLSv1.3

    See TLS and Cryptography Libraries Used by MariaDB for more information about which libraries are used by the server and by clients on each platform.

    TLS Protocol Version Support in OpenSSL

    MariaDB binaries built with the OpenSSL library (OpenSSL 1.0.1 or later) support TLSv1.1 and TLSv1.2 since , , and .

    MariaDB binaries built with the OpenSSL library (OpenSSL 1.1.1 or later) support TLSv1.3 since and .

    If your MariaDB Server binary is built with OpenSSL, then you can set the ssl_cipher system variable to values like SSLv3 or TLSv1.2 to allow all SSLv3.0 or all TLSv1.2 ciphers. However, this does not necessarily limit the protocol version to TLSv1.2. See MDEV-14101 for more information about that.

    Note that the TLSv1.3 ciphers cannot be excluded when using OpenSSL, even by using the ssl_cipher system variable. See Using TLSv1.3 for details.

    SSLv3.0 is known to be vulnerable to the POODLE attack, so it should not be used. SSLv2.0 and SSLv3.0 are disabled for MariaDB Server binaries linked with OpenSSL since , , and . If you are using a MariaDB version older than that and you cannot upgrade, then please see the section titled "SSL 3.0 Fallback protection" in OpenSSL Security Advisory - 15 Oct 2014.

    TLS Protocol Version Support in wolfSSL

    MariaDB binaries built with the bundled wolfSSL library support TLSv1.0, TLSv1.1, TLSv1.2, and TLSv1.3.

    TLS Protocol Version Support in yaSSL

    MariaDB binaries built with the bundled yaSSL library support SSLv3.0, TLSv1.0, and TLSv1.1.

    SSLv3.0 is known to be vulnerable to the POODLE attack, so it should not be used. SSLv2.0 and SSLv3.0 are disabled for MariaDB Server binaries linked with yaSSL since , , and .

    TLS Protocol Version Support in Schannel

    MariaDB binaries built with the Schannel library support different versions of TLS on different versions of Windows. See the Protocols in TLS/SSL (Schannel SSP) documentation from Microsoft to determine which versions of TLS are supported on each version of Windows.

    TLS Protocol Version Support in GnuTLS

    MariaDB binaries built with the GnuTLS library support TLSv1.0, TLSv1.1, TLSv1.2, and TLSv1.3.

    Enabling TLS

    See Securing Connections for Client and Server for information on how to enable TLS on the client and server.

    Certificate Verification

    Certificate verification is how TLS authenticates its connections by verifying that it is talking to who it says it is. There are multiple components to this verification process:

    • Was the certificate signed by a trusted Certificate Authority (CA)?

    • Is the certificate expired?

    • Is the certificate on my Certificate Revocation List (CRL)?

    • Does the certificate belong to who I believe that I'm communicating with?

    Certificate Authorities (CAs)

    Certificate Authorities (CAs) are entities that you trust to sign TLS certificates. Your organization might have its own internal CA, or it might use trusted third-party CAs.

    CAs are specified on the server and client by using the ssl_ca and ssl_capath options.

    The ssl_ca option defines a path to a PEM file that should contain one or more X509 certificates for trusted Certificate Authorities (CAs). This option requires that you use the absolute path, not a relative path.

    The ssl_capath option defines a path to a directory that contains one or more PEM files that should each contain one X509 certificate for a trusted Certificate Authority (CA). This option requires that you use the absolute path, not a relative path. The ssl_capath option is only supported if the server or client was built with OpenSSL, wolfSSL, or yaSSL. If the client was built with GnuTLS or Schannel, then the ssl_capath option is not supported.

    See TLS and Cryptography Libraries Used by MariaDB for more information about which libraries are used on which platforms.

    The directory specified by ssl_capath needs to be run through the openssl rehash command. For example, if the following is configured:

    Then you would have to execute the following:

    Requiring a Specific Certificate Authority (CA)

    The server can require a specific Certificate Authority (CA) for a client if the client's user account has been defined with REQUIRE ISSUER. See Securing Connections for Client and Server: Requiring TLS for more information.

    Certificate Revocation Lists (CRLs)

    Certificate Revocation Lists (CRLs) are lists of certificates that have been revoked by the Certificate Authority (CA) before they were due to expire.

    CRLs are specified on the server and client by using the ssl_crl and ssl_crlpath options.

    The ssl_crl option defines a path to a PEM file that should contain one or more X509 revoked certificates. This option requires that you use the absolute path, not a relative path. For servers, the ssl_crl option is only valid if the server was built with OpenSSL. If the server was built with wolfSSL or yaSSL, then the ssl_crl option is not supported. For clients, the ssl_crl option is only valid if the client was built with OpenSSL or Schannel. Likewise, if the client was built with GnuTLS, wolfSSL or yaSSL, then the ssl_crl option is not supported.

    The ssl_crlpath option defines a path to a directory that contains one or more PEM files that should each contain one revoked X509 certificate. This option requires that you use the absolute path, not a relative path. The ssl_crlpath option is only supported if the server or client was built with OpenSSL. If the server was built with wolfSSL or yaSSL, then the ssl_crlpath option is not supported. Likewise, if the client was built with GnuTLS, Schannel, wolfSSL, or yaSSL, then the ssl_crlpath option is not supported.

    See TLS and Cryptography Libraries Used by MariaDB for more information about which libraries are used on which platforms.

    The directory specified by ssl_crlpath needs to be run through the openssl rehash command. For example, if the following is configured:

    Then you would have to execute the following:

    Server Certificate Verification

    Normally the TLS implementation performs numerous checks to verify whether the certificate is valid. It should be within its validity period, not revoked, signed by a trusted certificate authority, belong to the host that uses it.

    Clients and utilities enable all these checks by default. Last two checks can be disabled with an option, such as disable-ssl-verify-server-cert. Before , all server certificate verification checks were disabled by default, and could be enabled with the ssl-verify-server-cert option.

    To verify whether the server's certificate belong to server's host, clients and utilities will check the Common Name (CN) attribute located in the Subject field of the certificate against the server's host name and IP address. If the Common Name (CN) matches either of those, then the certificate is verified.

    Server Certificate Verification with Subject Alternative Names (SANs)

    The Subject Alternative Name (SAN) field, which is an X.509v3 extension, can also be used for server certificate verification, if it is present in the server certificate. This field is also sometimes called subjectAltName. When using a client or utility that supports server certificate verification with subjectAltName fields, if the server certificate contains any subjectAltName fields, then those fields will also be checked against the server's host name and IP address.

    Whether server certificate verification with subjectAltName fields is supported depends on the underlying TLS library used by the client or utility.

    See TLS and Cryptography Libraries Used by MariaDB for more information about which libraries are used on which platforms.

    SAN Support with OpenSSL, wolfSSL, and yaSSL

    For clients and utilities built with OpenSSL (OpenSSL 1.0.2 or later), support for server certificate verification with subjectAltName fields that contain the server's host name was added in and . See MDEV-10594 for more information.

    For clients and utilities built with OpenSSL (OpenSSL 1.0.2 or later), support for server certificate verification with subjectAltName fields that contain the server's IP address was added in , , , and . See MDEV-18131 for more information.

    This support also applies to other TLS libraries that use OpenSSL's API. In OpenSSL's API, server certificate verification with subjectAltName fields depends on the X509_check_host and X509_check_ip functions. These functions are supported in the following TLS libraries:

    • OpenSSL 1.0.2 or later

    • wolfSSL

    And they are not supported in the following TLS libraries:

    • yaSSL

    MariaDB's RPM packages were built with OpenSSL 1.0.1 on RHEL 7 and CentOS 7, even after OpenSSL 1.0.2 became available on those distributions. As a side effect, the clients and utilities bundled in these packages did not support server certificate verification with the subjectAltName field, even if the packages were installed on a system that had OpenSSL 1.0.2 installed. Starting with MariaDB , , , and , MariaDB's RPM packages on RHEL 7 and CentOS 7 are built with OpenSSL 1.0.2. See MDEV-18277 for more information.

    SAN Support with Schannel

    For clients and utilities linked with Schannel, support for server certificate verification with subjectAltName fields was added in 3.0.2. See CONC-250 for more information.

    SAN Support with GnuTLS

    For clients and utilities linked with GnuTLS, support for server certificate verification with subjectAltName fields was added in 3.0.0. See CONC-250 for more information.

    Client Certificate Verification

    The server verifies a client certificate by checking the client's known SUBJECT against the Subject attribute in the client's certificate. This is only done for user accounts that have been defined with REQUIRE SUBJECT. See Securing Connections for Client and Server: Requiring TLS for more information.

    See Also

    • Mission Impossible: Zero-Configuration SSL (mariadb.org)

    • Securing Connections for Client and Server

    • Using TLSv1.3

    • Certificate Creation with OpenSSL

    This page is licensed: CC BY-SA / Gnu FDL

    MariaDB 11.4

    Amazon Web Services (AWS) Key Management Service (KMS) Encryption Plugin Advanced Usage

    This document assumes you've already set up an Amazon Web Services (AWS) account, created a master key in the Key Management Service (KMS), and have done the basic work to set up the MariaDB AWS KMS plugin. These steps are all described in Amazon Web Services (AWS) Key Management Service (KMS) Encryption Plugin Setup Guide.

    Ultimately, keeping all the credentials required to read the key on a single host means that a user who has gained access to the host has enough information to read the encrypted files in the datadir, read the encrypted keys from the datadir, interact with AWS KMS to decrypt the encrypted keys, and then used the decrypted keys to decrypt the encrypted data.

    Theoretically, a superuser can read the memory of the MariaDB server process to read the decrypted keys or restart MariaDB with password authentication disabled in order to dump data, or add new users to MariaDB in order to allow a user to connect and dump the data. Resolving these issues is beyond the scope of this document. A user who gains root access to your operating system or root access to your MariaDB server will have the ability to decrypt your data. Plan accordingly.

    Managing AWS credentials

    Putting the AWS credentials in a file inside the MariaDB home directory is not ideal. By default, any user with the FILE privilege can read any files that the MariaDB server has permission to read, which would include the credentials file. To protect against this, you should set secure_file_priv to restrict the location the server will allow a user to read from when executing LOAD DATA INFILE or the LOAD_FILE() function.

    But putting them in other locations requires passing additional data to the server, which in the case of CentOS 7 requires customizing the systemd startup procedure. This is most easily done by creating a "drop-in" file in /etc/systemd/system/mariadb.service.d/. The file should end in ".conf" but can otherwise be named whatever you like. After making any changes to systemd files, execute systemctl daemon-reload and then start (or restart) the service as usual.

    You can place the credentials file in a location of your choosing and then refer to that file by setting the AWS_CREDENTIAL_PROFILES_FILE environment variable in the drop-in file:

    The credentials file will need to be readable by the "mysql" user, but it does not need to be readable by any other user.

    AWS credentials can also be put directly into a "drop-in" systemd file that will be read when starting the MariaDB service:

    However, any OS user can read this information from systemd, which could be considered a security risk. Another solution is to put the credentials in a separate file that is only readable by root and then refer to that file using an EnvironmentFile directive in a drop-in systemd file.

    That has the advantage the credentials can only be read directly by root. systemd adds those variables to the environment of the MariaDB server when starting it, and MariaDB can use the credentials to interact with AWS. Note, though, that any process running as the "mysql" user can still read the credentials from the proc filesystem on Linux.

    AWS KMS Key Policy

    AWS KMS allows flexible, user-editable key policy. This offers fine-grained control over which users can operate on keys. The possibilities range from simply restricting which IP addresses are allowed to perform operations on the key, to requiring a MFA (Multi-Factor Authentication) device to use the key, to enforcing separation of responsibilities by creating an additional user with limited privileges to enable and disable the key. All 3 of these options will be outlined in this section.

    For more details about customizing the Key Policy for your master keys, please consult the documentation.

    Source IP restrictions

    A simple, common-sense restriction to put in place is to restrict the range of IP addresses that are allowed to use your master key. This way, even if someone obtains API credentials, they'll be unable to use them to decrypt your encryptions keys from a different host.

    To restrict API access from only a specific IP address or range of IP addresses, you'll need to manually edit the key policy.

    1. Load the IAM console at.

    2. Click "Encryption Keys" in the left-hand sidebar.

    3. Click the name of your encryption key to view its details.

    4. Click the link labeled "Switch to policy view", to the right of the heading of the "Key Policy" section.

    ... replacing 10.1.2.3/32 above with an IP address or range of IP addresses in CIDR format. For example, a single address would be 192.168.12.34/32, while a range of addresses might be 192.168.0.0/24.

    1. Click "Save Changes".

    2. Click "Proceed" if prompted with a warning about using the default view in the future.

    Access to the API will now be restricted to requests coming from the IP address or range of IP addresses specified in the policy.

    Using a Multi-Factor Authentication (MFA) device

    One approach is to modify the key policy for the master key so that MFA (Multi-Factor Authentication) is required in order to use the key. This is achieved with a wrapper that handles prompting the user for an MFA token, acquires temporary, limited-privilege credentials from the AWS Security Token Service (STS), and puts those credentials into the environment of the MariaDB server process. The credentials can expire after as little as 15 minutes.

    To require an MFA token for users of the key, you'll need to manually edit the key policy.

    1. Load the IAM console at.

    2. Click "Encryption Keys" in the left-hand sidebar.

    3. Click the name of your encryption key to view its details.

    4. Click the link labeled "Switch to policy view", to the right of the heading of the "Key Policy" section.

    1. Click "Save Changes".

    2. Click "Proceed" if prompted with a warning about using the default view in the future.

    Now, add an MFA device for your user. You'll need to have a hardware MFA device or an application such as Google Authenticator installed on your smartphone.

    1. Click "Users" in the left-hand sidebar.

    2. Click the name of your user.

    3. Click the "Security Credentials" tab.

    4. In the "Sign-In Credentials" section, click the "Manage MFA Device" button.

    Now, set up the wrapper program.

    1. Copy the iam-kms-wrapper file to /usr/local/bin/, and ensure that it is executable.

    2. Create a drop-in systemd config file in /etc/systemd/system/mariadb.service.d/:

    1. Execute systemctl daemon-reload.

    2. Create a file at /etc/my.cnf.d/iam-kms-wrapper.config with these contents, using the ARN for your MFA device as the value for kms_mfa_id:

    When you start the MariaDB service now, the wrapper will temporarily create a socket file at the location given by the kms_mfa_socket option. The wrapper will read the MFA code from the socket and will use it to authenticate to KMS. To give the MFA code, simply write the digits to the socket file using echo: echo 111676 > /tmp/kms_mfa_socket.

    The systemctl command will block until MariaDB starts, so you will need to write the code to the socket file via a separate terminal.

    Note that the temporary credentials put into the environment of the MariaDB process will expire after a period of time defined by the request to the AWS Security Token Service (STS). In the example below, they will expire after 900 seconds. After that time, MariaDB may be unable to generate new encrypted data keys, which means that, for example, an attempt to create a table with a previously-unused key ID would fail.

    Wrapper program example

    Here's an example wrapper program written in go. Build this into an executable named iam-kms-wrapper and use it as instructed above. This could of course be written in any language for which an appropriate AWS SDK exists, but go has the benefit of compiling to a static binary, which means you do not have to worry about interpreter versions or installing complex dependencies on the host that runs your MariaDB server.

    Disabling keys when not needed

    Another possibility is to use the API to disable access to the master key and enable it only when a trusted administrator knows that the MariaDB service needs to be started. A specialized tool on a separate host could be used to enable the key for a very short period of time while the service starts and then quickly disable the key.

    To do this, you can create an extra IAM User that can only use the kms:EnableKey and kms:DisableKey API endpoints for your key. This user will not be able to encrypt or decrypt any data using the key.

    First, create a new user.

    1. Load the IAM console at.

    2. Click "Users" in the left-hand sidebar.

    3. Click "Create New Users".

    4. Enter a new user name. (The examples will use "MDBEncAdmin".)

    1. Click "Close".

    2. Click "Close" again if prompted.

    3. Click the name of your new user to open the details view.

    4. Copy the "User ARN" value for your user (for example "arn:aws:iam::551888181234:user/MDBEncAdmin"). You will need this for the next step.

    Now, give the new user permission to perform API operations on your key.

    1. Click "Encryption Keys" in the left-hand sidebar.

    2. Click the name of your key to open the details view.

    3. Click "Switch to policy view" if it is not already open. (The "policy view" is a large text field that contains JSON describing the key policy.)

    4. Create a new item in the Statement array with this structure:

    ...so that your Key Policy looks like this:

    1. Click "Save Changes".

    You've now added a new IAM user and you've given that user privileges to enable and disable your key. This user will be able to perform those operations using the AWS CLI or via a script of your own design using the AWS API. For example, using the :

    In order for MariaDB to start, this new user will have to enable the master key, then the DBA can start MariaDB, and this user can once again disable the master key after the service has started. Note that in this workflow, MariaDB will be unable to create new encryption keys, such as would be done when a user creates a table that refers to a non-existent key ID. The AWS KMS plugin will encounter an error if it tries to generate a new encryption key while the master key is disabled. In that scenario, the key administrator would have to enable the key before the operation could succeed. Here's what you should expect to see in the journal if MariaDB tries to interact with a disabled master key:

    Adding MFA

    It's also possible to add MFA to this technique so that the user that enables & disables the master key has to authenticate using an MFA device. Adapt the instructions in the MFA section above to add MFA to the policy section for the user with EnableKey and DisableKeys privileges, add an MFA device for that user, use Security Token Service (STS) to get temporary security credentials, and then use those credentials to make the API calls. Here's an example Python script that follows that workflow:

    Logging and auditing

    CloudTrail

    Amazon's CloudTrail service creates JSON-formatted text log files for every API interaction. Enabling CloudTrail requires S3, which incurs additional fees.

    First, enable CloudTrail and add a trail.

    1. Load the CloudTrail console at.

    2. If you've never used CloudTrail before, click "Get Started Now".

    3. Enter a value for "trail name". This example uses "mariadb-encryption-key".

    4. Create a new S3 bucket, using a globally unique name, or use an existing S3 bucket, according to your needs.

    If you navigate to the S3 bucket you created, you should find log files that contain JSON-formatted descriptions of your API interactions.

    CloudWatch

    Amazon's CloudWatch service allows you to create alarms and event rules that monitor log information.

    First, send your CloudTrail logs to CloudWatch.

    1. Load the CloudTrail console at.

    2. Click "Trails" in the left-hand navigation sidebar.

    3. Click the name of your trail to open the Configuration view.

    4. In the "CloudWatch Logs" section, click "Configure".

    Now, set up an SNS topic to facilitate email notifications.

    1. Open.

    2. Make sure the region in the console (look in the upper-right corner) is the same as the region where you created your key!

    3. Click "Get Started" is prompted.

    4. Click "Events" in the left-hand sidebar.

    Now, configure CloudWatch and create an Event Rule.

    1. Open.

    2. Make sure the region in the console (look in the upper-right corner) is the same as the region where you created your key and your SNS topic!

    3. Click "Events" in the left-hand sidebar.

    4. Click "Create rule".

    You should now get emails any time someone executes API calls on the KMS service in the region where you've created the CloudWatch Event rule. That means you should get email any time the key is enabled or disabled, and any time the AWS KMS plugin generates new keys or decrypts the keys stored on disk on the MariaDB server.

    You may also wish to create an event rule (or an additional event) that matches only when an unauthorized user tries to access the key. You might accomplish that by manually editing the Event selector of the rule to look something like this:

    The emails are formatted as JSON. Further customization of the CloudWatch email workflow is beyond the scope of this document.

    There are many other workflows available using CloudWatch, including workflows with alarms and dashboards. Those are beyond the scope of this document.

    This page is licensed: CC BY-SA / Gnu FDL

    [mariadb]
    ...
    plugin_load_add = file_key_management
    UNINSTALL SONAME 'file_key_management';
    <encryption_key_id>;<encryption_key_version>;<hex-encoded_encryption_key>
    <encryption_key_id>;<hex-encoded_encryption_key>
    $ openssl rand -hex 32
    a7addd9adea9978fda19f21e6be987880e68ac92632ca052e5bb42b1a506939a
    mkdir -p /etc/mysql/encryption
    echo $(echo -n "1;" ; openssl rand -hex 32) | sudo tee -a  /etc/mysql/encryption/keyfile
    echo $(echo -n "2;" ; openssl rand -hex 32) | sudo tee -a  /etc/mysql/encryption/keyfile
    echo $(echo -n "100;" ; openssl rand -hex 32) | sudo tee -a  /etc/mysql/encryption/keyfile
    1;1;a7addd9adea9978fda19f21e6be987880e68ac92632ca052e5bb42b1a506939a
    2;1;49c16acc2dffe616710c9ba9a10b94944a737de1beccb52dc1560abfdd67388b
    100;2;8db1ee74580e7e93ab8cf157f02656d356c2f437d548d5bf16bf2a56932954a3
    1;a7addd9adea9978fda19f21e6be987880e68ac92632ca052e5bb42b1a506939a
    2;49c16acc2dffe616710c9ba9a10b94944a737de1beccb52dc1560abfdd67388b
    100;8db1ee74580e7e93ab8cf157f02656d356c2f437d548d5bf16bf2a56932954a3
    [mariadb]
    ...
    loose_file_key_management_filename = /etc/mysql/encryption/keyfile
    $ sudo openssl rand -hex 128 > /etc/mysql/encryption/keyfile.key
    $ sudo openssl enc -aes-256-cbc -md sha256 -pbkdf2 -pass pass:secret -in /tmp/keys.txt -out /tmp/keys.enc
    $ sudo openssl enc -aes-256-cbc -md sha256 -iter 20000 -pass pass:secret -in /tmp/keys.txt -out /tmp/keys.enc
    [mariadb]
    ...
    loose_file_key_management_filename = /etc/mysql/encryption/keyfile.enc
    loose_file_key_management_filekey = FILE:/etc/mysql/encryption/keyfile.key
    [mariadb]
    ...
    loose_file_key_management_encryption_algorithm = AES_CTR
    CREATE TABLE t (i INT) ENGINE=InnoDB ENCRYPTED=YES
    -- Generate a new 256-bit key
    openssl rand -hex 32
    SHOW GLOBAL VARIABLES LIKE 'have_ssl';
    +---------------+----------+
    | Variable_name | Value    |
    +---------------+----------+
    | have_ssl      | DISABLED |
    +---------------+----------+
    [mariadb]
    ...
    tls_version = TLSv1.2,TLSv1.3
    SHOW GLOBAL VARIABLES LIKE 'tls_version';
    [client-mariadb]
    ...
    tls_version = TLSv1.2,TLSv1.3
    $ mariadb -u myuser -p -h myserver.mydomain.com \
       --ssl \
       --tls-version="TLSv1.2,TLSv1.3"
    ssl_capath=/etc/my.cnf.d/certificates/ca/
    openssl rehash /etc/my.cnf.d/certificates/ca/
    ssl_crlpath=/etc/my.cnf.d/certificates/crl/
    openssl rehash /etc/my.cnf.d/certificates/crl/
    Locate the section that contains "Sid": "Allow use of the key".
  • Add this text below the "Sid" line:

  • Locate the section that contains "Sid": "Allow use of the key".
  • Add this text below the "Sid" line:

  • Complete the steps to activate your MFA device.
  • Copy the ARN for your MFA device. You will need to use this when configuring the wrapper program.

  • Click "Show User Security Credentials".
  • Copy the credentials and put them in a credentials file with this structure:

  • Click "Turn On".

    Click "Continue".
  • Click "Allow".

  • Click "Create new topic".
  • Enter a Topic name of your choosing.

  • Enter a Display name of your choosing.

  • Click "Create topic".

  • Click the ARN of your new SNS topic.

  • Click "Create Subscription".

  • Select "Email" from the Protocol dropdown.

  • Enter the desired notification email address in the Endpoint field.

  • Wait for the confirmation email to show up and follow the instructions.

  • Choose "AWS API call" from the "Select event source" dropdown.
  • Choose "KMS" from the "Service name" dropdown.

  • Decide which operations should trigger the event. (You can eep "Any operation" selected for simplicity.)

  • Click "Add target".

  • Select "SNS target" from the dropdown.

  • Select the SNS topic you created in the previous steps.

  • Click "Configure details".

  • Enter a Name and Description of your choosing.

  • Click "Create rule".

  • AWS Key Management Service Key Policy
    AWS CLI
    [Service]
    Environment=AWS_CREDENTIAL_PROFILES_FILE=/etc/aws-kms-credentials
    # cat /etc/systemd/system/mariadb.service.d/aws-kms.conf
    [Service]
    Environment=AWS_ACCESS_KEY_ID=AKIAIRSG2XYZATCJLZ4A
    Environment=AWS_SECRET_ACCESS_KEY=ux91LZIxCp4ZXabcdefgIViQNtTan42QAmJqJVqV
    # cat /etc/systemd/system/mariadb.service.d/aws-kms.env
    AWS_ACCESS_KEY_ID=AKIAIRSG2XYZATCJLZ4A
    AWS_SECRET_ACCESS_KEY=ux91LZIxCp4ZXabcdefgIViQNtTan42QAmJqJVqV
    
    # chown root /etc/systemd/system/mariadb.service.d/aws-kms.env
    # chmod 600 /etc/systemd/system/mariadb.service.d/aws-kms.env
    
    # cat /etc/systemd/system/mariadb.service.d/aws-kms.conf
    [Service]
    EnvironmentFile=/etc/systemd/system/mariadb.service.d/aws-kms.env
    $ whoami
    mysql
    $ cat /proc/$(pgrep mysqld)/environ | tr '\0' '\n' | grep AWS
    AWS_ACCESS_KEY_ID=AKIAIRSG2XYZATCJLZ4A
    AWS_SECRET_ACCESS_KEY=ux91LZIxCp4ZXabcdefgIViQNtTan42QAmJqJVqV
    "Condition": {
     "IpAddress": {
     "aws:SourceIp": [
     "10.1.2.3/32"
     ]
     }
     },
    "Condition": {
     "Bool": {
     "aws:MultiFactorAuthPresent": "True"
     }
     },
    [Service]
    EnvironmentFile=/etc/systemd/system/mariadb.service.d/aws-kms.env
    ExecStart=
    ExecStart=/usr/local/bin/iam-kms-wrapper --config=/etc/my.cnf.d/iam-kms-wrapper.config /usr/sbin/mysqld $MYSQLD_OPTS
    [kms]
    kms_mfa_id = arn:aws:iam::551888187628:mfa/MDBEnc
    kms_mfa_socket = /tmp/kms_mfa_socket
    package main
    
    import (
        "syscall"
        "os"
        "log"
        "flag"
        "github.com/aws/aws-sdk-go/aws"
        "github.com/aws/aws-sdk-go/aws/session"
        "github.com/aws/aws-sdk-go/aws/awserr"
        "github.com/aws/aws-sdk-go/service/sts"
        "github.com/robfig/config"
    )
    
    func main() {
    
        config_file_p := flag.String("config", "", "location of the config file")
        flag.Parse()
    
        if flag.NArg() < 1 {
            log.Fatal("Command to wrap must be given as first command-line argument")
        }
    
        cmd := flag.Arg(0)
        args := flag.Args()[0:]
    
        conf, err := config.ReadDefault(*config_file_p)
        if err != nil {
            log.Fatal(err)
        }
    
        kms_mfa_id, err := conf.String("kms","kms_mfa_id")
        mfa_socket_file, err := conf.String("kms","kms_mfa_socket")
    
        sess := session.New()
        svc := sts.New(sess)
    
        syscall.Umask(0044)
    
        log.Printf("Reading MFA token from %s\n",mfa_socket_file)
    
        if err := syscall.Mknod(mfa_socket_file, syscall.S_IFIFO|uint32(os.FileMode(0622)), 0); err != nil {
            log.Fatal(err)
        }
    
        file, err := os.Open(mfa_socket_file)
        if err != nil {
            log.Fatal(err)
        }
    
        token := make([]byte, 6)
    
        if _, err := file.Read(token); err != nil {
            log.Fatal(err)
        }
    
        file.Close()
    
        if err := syscall.Unlink(mfa_socket_file); err != nil {
            log.Fatal(err)
        }
    
        mfa_token := string(token)
    
        token_params := &sts.GetSessionTokenInput{
            DurationSeconds: aws.Int64(900),
            SerialNumber:    aws.String(kms_mfa_id),
            TokenCode:       aws.String(mfa_token),
        }
    
        resp, err := svc.GetSessionToken(token_params)
        if err != nil {
            if awsErr, ok := err.(awserr.Error); ok {
                // Prints out full error message, including original error if there was one.
                log.Fatal("Error:", awsErr.Error())
            } else {
                log.Fatal("Error:", err.Error())
            }
        }
    
        creds := resp.Credentials
    
        os.Setenv("AWS_ACCESS_KEY_ID",*creds.AccessKeyId)
        os.Setenv("AWS_SECRET_ACCESS_KEY",*creds.SecretAccessKey)
        os.Setenv("AWS_SESSION_TOKEN",*creds.SessionToken)
    
        execErr := syscall.Exec(cmd, args, os.Environ())
        if execErr != nil {
            panic(execErr)
        }
    }
    [MDBEncAdmin]
    aws_access_key_id=AKIAJMPPNO7EBKABCDEF
    aws_secret_access_key=pVdGwbuK5/jG64aBK1oEJOXRlkdM0aAylgabCDef
    {
     "Sid": "Allow Enable and Disable of the key",
     "Effect": "Allow",
     "Principal": {
     "AWS": "arn:aws:iam::551888181234:user/MDBEncAdmin"
     },
     "Action": [
     "kms:EnableKey",
     "kms:DisableKey"
     ]
     },
    {
     "Version": "2012-10-17",
     "Id": "key-consolepolicy-2",
     "Statement": [
     {
     "Sid": "Allow Enable and Disable of the key",
     "Effect": "Allow",
     "Principal": {
     ...
    $ cat ~/.aws/credentials
    [MDBEncAdmin]
    aws_access_key_id=AKIAJMPPNO7EBKABCDEF
    aws_secret_access_key=pVdGwbuK5/jG64aBK1oEJOXRlkdM0aAylgabCDef
    
    $ AWS_PROFILE=MDBEncAdmin aws --region us-east-1 kms disable-key --key-id arn:aws:kms:us-east-1:551888181234:key/abcdf8f6-084b-4cff-99ca-abcdef6c7907c
    [ERROR] AWS KMS plugin : GenerateDataKeyWithoutPlaintext failed : DisabledException - Unable to parse ExceptionName: DisabledException Message: arn:aws:kms:us-east-1:551888181234:key/abcdf8f6-084b-4cff-99ca-abcdef6c7907c is disabled.
    #!/usr/bin/env python
    
    import boto3
    import sys
    
    # Command-line argument processing should be more robust than this...
    action= sys.argv[1]
    mfa_token= sys.argv[2]
    
    # These should perhaps go into a config file instead of here
    mfa_serial= 'arn:aws:iam::551888181234:mfa/MDBEncAdmin'
    key_id= 'arn:aws:kms:us-east-1:551888181234:key/abcdf8f6-084b-4cff-99ca-abcdef6c7907c'
    
    # Make the connection to the Security Token Service to get temporary credentials
    token_client= boto3.client('sts')
    token_response= token_client.get_session_token(
        DurationSeconds= 900,
        SerialNumber= mfa_serial,
        TokenCode= mfa_token
    )
    
    cred= token_response['Credentials']
    
    # Start new session using temporary, MFA-authenticated credentials
    kms_session= boto3.session.Session(
        aws_access_key_id= cred['AccessKeyId'],
        aws_secret_access_key= cred['SecretAccessKey'],
        aws_session_token= cred['SessionToken'],
        region_name= key_id.split(':')[3]
    )
    
    # Start KMS client and execute operation against key
    kms_client= kms_session.client('kms')
    if action == 'enable' or action == 'e':
        action_f= kms_client.enable_key
    elif action == 'disable' or action == 'd':
        action_f= kms_client.disable_key
    else:
        raise Exception('Action must be either "disable" or "enable"')
    
    action_f(KeyId=key_id)
    $ AWS_PROFILE=MDBEncAdmin python kms-manage-key disable 575290
    $ AWS_PROFILE=MDBEncAdmin python kms-manage-key enable 799870
    {
      "detail-type": [
        "AWS API Call via CloudTrail"
      ],
      "detail": {
        "eventSource": [
          "kms.amazonaws.com"
        ],
        "errorCode": [
          "AccessDenied",
          "UnauthorizedOperation"
        ]
      }
    }
    Replication with Secure Connections
    SSL/TLS System Variables
    Data-at-Rest Encryption
    Cyberciti tutorial: How to setup MariaDB SSL and secure connections from clients
    MariaDB Connector/C
    MariaDB Connector/C
    MariaDB Connector/C
    MariaDB Connector/C
    MariaDB Connector/C
    MariaDB Connector/C
    TLS Options
    Using TLS/SSL with MariaDB Connector/J
    MariaDB Connector/C
    MariaDB Connector/C
    GPL 2.0 license
    encryption plugin API
    GPL 2.0 license
    encryption plugin API
    Securing Communications in Galera Cluster

    Security Vulnerabilities Fixed in MariaDB

    This page is about security vulnerabilities fixed in MariaDB. If you are looking for information on securing your MariaDB installation, see Securing MariaDB.

    Sensitive security issues can be reported on https://hackerone.com/mariadb or sent directly to the persons responsible for MariaDB security: security [AT] mariadb (dot) org.

    About CVEs

    CVE® stands for "Common Vulnerabilities and Exposures". It is a publicly available and free-to-use database of known software vulnerabilities maintained at .

    On this page is the master list of CVEs fixed across all versions of MariaDB. Follow the links for more information on a particular CVE or specific version of MariaDB.

    Some CVEs apply to MySQL but are not present in MariaDB; these are listed on the page.

    Separate lists of CVEs fixed in specific MariaDB series are maintained on their respective pages:

    Full List of CVEs fixed in MariaDB

    • : ,

    • : , , ,

    • : , , ,

    • :

    CVEs without specific version numbers:

    The following CVEs were fixed in and/or as indicated, but the fix is not tied to a specific MariaDB version.

    • : ,

    • : ,

    • : ,

    • : ,

    This page is licensed: CC BY-SA / Gnu FDL

  • MariaDB 11.4

  • MariaDB 10.11

  • MariaDB 10.6

  • ,
    ,
    ,
    ,
  • CVE-2024-21096: MariaDB 11.4.2, , , , MariaDB 10.6.18, , MariaDB 10.11.8

  • CVE-2023-52970: MariaDB 11.4.6, MariaDB 10.11.12, MariaDB 10.6.22,

  • CVE-2023-52969: MariaDB 11.4.6, MariaDB 10.11.12, MariaDB 10.6.22,

  • CVE-2023-5157: MariaDB 10.8.4, MariaDB 10.7.5, MariaDB 10.6.9, MariaDB 10.5.17, MariaDB 10.4.26, MariaDB 10.3.36

  • CVE-2023-22084: , , , , MariaDB 10.6.16, , , MariaDB 10.11.6,

  • CVE-2022-47015: , , MariaDB 10.6.13, , , , MariaDB 10.11.3,

  • CVE-2022-38791: MariaDB 10.9.2, MariaDB 10.8.4, MariaDB 10.7.5, MariaDB 10.6.9, MariaDB 10.5.17, MariaDB 10.4.26, MariaDB 10.3.36

  • CVE-2022-32091: MariaDB 10.9.2, MariaDB 10.8.4, MariaDB 10.7.5, MariaDB 10.6.9, MariaDB 10.5.17, MariaDB 10.4.26, MariaDB 10.3.36

  • CVE-2022-32089: MariaDB 10.9.2, MariaDB 10.8.4, MariaDB 10.7.5, MariaDB 10.6.9, MariaDB 10.5.17, MariaDB 10.4.26

  • CVE-2022-32088: , MariaDB 10.6.8, , , ,

  • CVE-2022-32087: , MariaDB 10.6.8, , ,

  • CVE-2022-32086: , MariaDB 10.6.8, ,

  • CVE-2022-32085: , MariaDB 10.6.8, , ,

  • CVE-2022-32084: MariaDB 10.9.2, MariaDB 10.8.4, MariaDB 10.7.5, MariaDB 10.6.9, MariaDB 10.5.17, MariaDB 10.4.26, MariaDB 10.3.36

  • CVE-2022-32083: , MariaDB 10.6.8, , , ,

  • CVE-2022-32082: MariaDB 10.9.2, MariaDB 10.8.4, MariaDB 10.7.5, MariaDB 10.6.9, MariaDB 10.5.17

  • CVE-2022-32081: MariaDB 10.9.2, MariaDB 10.8.4, MariaDB 10.7.5, MariaDB 10.6.9, MariaDB 10.5.17, MariaDB 10.4.26

  • CVE-2022-31624: MariaDB 10.6.5, , , ,

  • CVE-2022-31623: MariaDB 10.6.6, , , ,

  • CVE-2022-31622: MariaDB 10.6.6, , , ,

  • CVE-2022-31621: MariaDB 10.6.5, , , ,

  • CVE-2022-27458: , MariaDB 10.6.8, , ,

  • CVE-2022-27457: , MariaDB 10.6.8, ,

  • CVE-2022-27456: , MariaDB 10.6.8, , ,

  • CVE-2022-27455: , MariaDB 10.6.8, ,

  • CVE-2022-27452: , MariaDB 10.6.8, , ,

  • CVE-2022-27451: , MariaDB 10.6.8, ,

  • CVE-2022-27449: , MariaDB 10.6.8, , ,

  • CVE-2022-27448: , MariaDB 10.6.8, , ,

  • CVE-2022-27447: , MariaDB 10.6.8, , ,

  • CVE-2022-27446: , MariaDB 10.6.8, ,

  • CVE-2022-27445: , MariaDB 10.6.8, , , ,

  • CVE-2022-27444: , MariaDB 10.6.8, ,

  • CVE-2022-27387: , MariaDB 10.6.8, , , ,

  • CVE-2022-27386: , MariaDB 10.6.8, , , ,

  • CVE-2022-27385: MariaDB 10.6.5, , ,

  • CVE-2022-27384: , MariaDB 10.6.8, , , ,

  • CVE-2022-27383: , MariaDB 10.6.8, , , ,

  • CVE-2022-27382: , MariaDB 10.6.8, ,

  • CVE-2022-27381: , MariaDB 10.6.8, , , ,

  • CVE-2022-27380: , MariaDB 10.6.8, , , ,

  • CVE-2022-27379: , MariaDB 10.6.8, , ,

  • CVE-2022-27378: , MariaDB 10.6.8, , , ,

  • CVE-2022-27377: , MariaDB 10.6.8, , , ,

  • CVE-2022-27376: , MariaDB 10.6.8, , ,

  • CVE-2022-24052: , , MariaDB 10.6.6, , , ,

  • CVE-2022-24051: , , MariaDB 10.6.6, , , ,

  • CVE-2022-24050: , , MariaDB 10.6.6, , , ,

  • CVE-2022-24048: , , MariaDB 10.6.6, , , ,

  • CVE-2022-21595: , MariaDB 10.6.6, , , ,

  • CVE-2022-21451: , , ,

  • CVE-2022-21427: , , ,

  • CVE-2022-0778: , MariaDB 10.6.6, , , ,

  • CVE-2021-46669: , MariaDB 10.6.8, , , ,

  • CVE-2021-46668: , MariaDB 10.6.7, , , ,

  • CVE-2021-46667: MariaDB 10.6.5, , , ,

  • CVE-2021-46666: , , ,

  • CVE-2021-46665: , MariaDB 10.6.7, , , ,

  • CVE-2021-46664: , MariaDB 10.6.7, , , ,

  • CVE-2021-46663: , MariaDB 10.6.7, , , ,

  • CVE-2021-46662: MariaDB 10.6.5, , ,

  • CVE-2021-46661: , MariaDB 10.6.7, , , ,

  • CVE-2021-46659: , , MariaDB 10.6.6, , , ,

  • CVE-2021-46658: MariaDB 10.6.3, , , ,

  • CVE-2021-46657: , , ,

  • CVE-2021-35604: MariaDB 10.6.3, , , ,

  • CVE-2021-27928: , , ,

  • CVE-2021-2389: MariaDB 10.6.4 [2], , , ,

  • CVE-2021-2372: MariaDB 10.6.4 [2], , , ,

  • CVE-2021-2194: , , ,

  • CVE-2021-2180:

  • CVE-2021-2174:

  • CVE-2021-2166: , , ,

  • CVE-2021-2154: , , ,

  • CVE-2021-2144: , , , ,

  • CVE-2021-2032: MariaDB 10.0.11

  • CVE-2021-2022: , , , ,

  • CVE-2021-2011: , , , ,

  • CVE-2021-2007: , , , , ,

  • CVE-2020-7221:

  • CVE-2020-2922: , , , , ,

  • CVE-2020-28912: , , , ,

  • CVE-2020-2814: , , ,

  • CVE-2020-2812: , , , ,

  • CVE-2020-2780: , , , ,

  • CVE-2020-2760: , ,

  • CVE-2020-2752: , , , , ,

  • CVE-2020-2574: , , , , ,

  • CVE-2020-15180: , , , ,

  • CVE-2020-14812: , , , ,

  • CVE-2020-14789: , , ,

  • CVE-2020-14776: , , ,

  • CVE-2020-14765: , , , ,

  • CVE-2020-14550: , , , ,

  • CVE-2020-13249: , , ,

  • CVE-2019-2974: , , , ,

  • CVE-2019-2938: , ,

  • CVE-2019-2805: , , , ,

  • CVE-2019-2758: , ,

  • CVE-2019-2740: , , , ,

  • CVE-2019-2739: , , , ,

  • CVE-2019-2737: , , , ,

  • CVE-2019-2628: , ,

  • CVE-2019-2627: , , , ,

  • CVE-2019-2614: , , , ,

  • CVE-2019-2537: , , ,

  • CVE-2019-2529: , ,

  • CVE-2019-2510: ,

  • CVE-2019-2503: , , , ,

  • CVE-2019-2481: , MariaDB 10.0.11

  • CVE-2019-2455: , , ,

  • CVE-2018-3284: ,

  • CVE-2018-3282: , , , ,

  • CVE-2018-3277: ,

  • CVE-2018-3251: , , ,

  • CVE-2018-3200: ,

  • CVE-2018-3185: ,

  • CVE-2018-3174: , , , ,

  • CVE-2018-3173: ,

  • CVE-2018-3162: ,

  • CVE-2018-3156: , , ,

  • CVE-2018-3143: , , ,

  • CVE-2018-3133: , , ,

  • CVE-2018-3081: , [], , , ,

  • CVE-2018-3066: , , , ,

  • CVE-2018-3064: , , ,

  • CVE-2018-3063: , , , ,

  • CVE-2018-3060: ,

  • CVE-2018-3058: , , , ,

  • CVE-2018-2819: , , ,

  • CVE-2018-2817: , , ,

  • CVE-2018-2813: , , ,

  • CVE-2018-2810:

  • CVE-2018-2787: , ,

  • CVE-2018-2786:

  • CVE-2018-2784: , ,

  • CVE-2018-2782: , ,

  • CVE-2018-2781: , , ,

  • CVE-2018-2777:

  • CVE-2018-2771: , , ,

  • CVE-2018-2767: , , ,

  • CVE-2018-2766: , ,

  • CVE-2018-2761: , , ,

  • CVE-2018-2759:

  • CVE-2018-2755: , , ,

  • CVE-2018-2668: , , ,

  • CVE-2018-2665: , , ,

  • CVE-2018-2640: , , ,

  • CVE-2018-2622: , , ,

  • CVE-2018-2612: , ,

  • CVE-2018-2562: , , ,

  • CVE-2018-25032: , , , MariaDB 10.9.2, MariaDB 10.8.4, MariaDB 10.7.5, MariaDB 10.6.9, MariaDB 10.5.17, MariaDB 10.4.26, MariaDB 10.3.36

  • CVE-2017-3653: , , ,

  • CVE-2017-3651: , ,

  • CVE-2017-3641: , , ,

  • CVE-2017-3636: , , ,

  • CVE-2017-3600: , ,

  • CVE-2017-3464: , , ,

  • CVE-2017-3456: , , ,

  • CVE-2017-3453: , , ,

  • CVE-2017-3318: , ,

  • CVE-2017-3317: , ,

  • CVE-2017-3313: , , ,

  • CVE-2017-3312: , ,

  • CVE-2017-3309: , , ,

  • CVE-2017-3308: , , ,

  • CVE-2017-3302: , , ,

  • CVE-2017-3291: , ,

  • CVE-2017-3265: , ,

  • CVE-2017-3258: , ,

  • CVE-2017-3257: , ,

  • CVE-2017-3244: , ,

  • CVE-2017-3243: , ,

  • CVE-2017-3238: , ,

  • CVE-2017-15365: ,

  • CVE-2017-10384: , , ,

  • CVE-2017-10379: , , ,

  • CVE-2017-10378: , , ,

  • CVE-2017-10365:

  • CVE-2017-10320:

  • CVE-2017-10286: , ,

  • CVE-2017-10268: , , ,

  • CVE-2016-9843: , , , ,

  • CVE-2016-8283: , ,

  • CVE-2016-7440: , ,

  • CVE-2016-6664: , ,

  • CVE-2016-6663: , ,

  • CVE-2016-6662: , ,

  • CVE-2016-5630:

  • CVE-2016-5629: , ,

  • CVE-2016-5626: , ,

  • CVE-2016-5624: , ,

  • CVE-2016-5616: , ,

  • CVE-2016-5612: ,

  • CVE-2016-5584: , ,

  • CVE-2016-5483: , ,

  • CVE-2016-5444: , MariaDB 10.1.14, MariaDB 10.0.25

  • CVE-2016-5440: , ,

  • CVE-2016-3615: , ,

  • CVE-2016-3521: , ,

  • CVE-2016-3492: , ,

  • CVE-2016-3477: , ,

  • CVE-2016-3471: , ,

  • CVE-2016-3459: MariaDB 10.1.14, MariaDB 10.0.25

  • CVE-2016-3452: , MariaDB 10.1.14, MariaDB 10.0.25

  • CVE-2016-2047: , ,

  • CVE-2016-0668: , MariaDB 10.0.24

  • CVE-2016-0666: , MariaDB 10.1.14, MariaDB 10.0.25

  • CVE-2016-0655: MariaDB 10.1.14, MariaDB 10.0.25

  • CVE-2016-0651: , ,

  • CVE-2016-0650: , , MariaDB 10.0.24

  • CVE-2016-0649: , , MariaDB 10.0.24

  • CVE-2016-0648: , MariaDB 10.1.14, MariaDB 10.0.25

  • CVE-2016-0647: , MariaDB 10.1.14, MariaDB 10.0.25

  • CVE-2016-0646: , , MariaDB 10.0.24

  • CVE-2016-0644: , , MariaDB 10.0.24

  • CVE-2016-0643: , MariaDB 10.1.14, MariaDB 10.0.25

  • CVE-2016-0642: , ,

  • CVE-2016-0641: , , MariaDB 10.0.24

  • CVE-2016-0640: , , MariaDB 10.0.24

  • CVE-2016-0616: , ,

  • CVE-2016-0610: ,

  • CVE-2016-0609: , ,

  • CVE-2016-0608: , ,

  • CVE-2016-0606: , ,

  • CVE-2016-0600: , ,

  • CVE-2016-0598: , ,

  • CVE-2016-0597: , ,

  • CVE-2016-0596: , ,

  • CVE-2016-0546: , ,

  • CVE-2016-0505: , ,

  • CVE-2016-0502: ,

  • CVE-2015-7744: , ,

  • CVE-2015-4913: , ,

  • CVE-2015-4895: ,

  • CVE-2015-4879: , ,

  • CVE-2015-4870: , ,

  • CVE-2015-4866: ,

  • CVE-2015-4864: , ,

  • CVE-2015-4861: , ,

  • CVE-2015-4858: , ,

  • CVE-2015-4836: , ,

  • CVE-2015-4830: , ,

  • CVE-2015-4826: , ,

  • CVE-2015-4819: , ,

  • CVE-2015-4816: , ,

  • CVE-2015-4815: , ,

  • CVE-2015-4807: , ,

  • CVE-2015-4802: , ,

  • CVE-2015-4792: , ,

  • CVE-2015-4757: ,

  • CVE-2015-4752: ,

  • CVE-2015-3152: ,

  • CVE-2015-2648: ,

  • CVE-2015-2643: ,

  • CVE-2015-2620: ,

  • CVE-2015-2582: ,

  • CVE-2015-2573: ,

  • CVE-2015-2571: ,

  • CVE-2015-2568: ,

  • CVE-2015-2326:

  • CVE-2015-2325:

  • CVE-2015-0505: ,

  • CVE-2015-0501: ,

  • CVE-2015-0499: ,

  • CVE-2015-0441: ,

  • CVE-2015-0433: ,

  • CVE-2015-0432: ,

  • CVE-2015-0411: ,

  • CVE-2015-0391: ,

  • CVE-2015-0382: ,

  • CVE-2015-0381: ,

  • CVE-2015-0374: ,

  • CVE-2014-8964:

  • CVE-2014-6568: ,

  • CVE-2014-6564:

  • CVE-2014-6559: ,

  • CVE-2014-6555: ,

  • CVE-2014-6551: ,

  • CVE-2014-6530: ,

  • CVE-2014-6520: ,

  • CVE-2014-6507: ,

  • CVE-2014-6505: ,

  • CVE-2014-6500: ,

  • CVE-2014-6496: ,

  • CVE-2014-6495: ,

  • CVE-2014-6494: ,

  • CVE-2014-6491: ,

  • CVE-2014-6489:

  • CVE-2014-6484: ,

  • CVE-2014-6478: ,

  • CVE-2014-6474:

  • CVE-2014-6469: ,

  • CVE-2014-6464: ,

  • CVE-2014-6463: ,

  • CVE-2014-4287: ,

  • CVE-2014-4274: ,

  • CVE-2014-4260: ,

  • CVE-2014-4258: ,

  • CVE-2014-4243: ,

  • CVE-2014-4207: ,

  • CVE-2014-3470:

  • CVE-2014-2494: ,

  • CVE-2014-2440: , MariaDB 10.0.11

  • CVE-2014-2438: ,

  • CVE-2014-2436: , MariaDB 10.0.11

  • CVE-2014-2432: ,

  • CVE-2014-2431: , MariaDB 10.0.11

  • CVE-2014-2430: , MariaDB 10.0.11

  • CVE-2014-2419: ,

  • CVE-2014-0437: ,

  • CVE-2014-0420: ,

  • CVE-2014-0412: ,

  • CVE-2014-0402: ,

  • CVE-2014-0401: ,

  • CVE-2014-0393: ,

  • CVE-2014-0386: ,

  • CVE-2014-0384: ,

  • CVE-2014-0224:

  • CVE-2014-0221:

  • CVE-2014-0198:

  • CVE-2014-0195:

  • CVE-2013-5908: ,

  • CVE-2013-5891: ,

  • CVE-2013-5807: ,

  • CVE-2013-3839: ,

  • CVE-2013-3812: ,

  • CVE-2013-3809: ,

  • CVE-2013-3808: ,

  • CVE-2013-3805: ,

  • CVE-2013-3804: ,

  • CVE-2013-3802: ,

  • CVE-2013-3801: ,

  • CVE-2013-3794: ,

  • CVE-2013-3793: ,

  • CVE-2013-3783: ,

  • CVE-2013-2392: ,

  • CVE-2013-2391: ,

  • CVE-2013-2389: ,

  • CVE-2013-2378: ,

  • CVE-2013-2376: ,

  • CVE-2013-2375: ,

  • CVE-2013-1861: ,

  • CVE-2013-1555: ,

  • CVE-2013-1552: ,

  • CVE-2013-1548: ,

  • CVE-2013-1544: ,

  • CVE-2013-1532: ,

  • CVE-2013-1531: , , , ,

  • CVE-2013-1526: ,

  • CVE-2013-1523: ,

  • CVE-2013-1521: ,

  • CVE-2013-1512: ,

  • CVE-2013-1511: ,

  • CVE-2013-1506: ,

  • CVE-2013-1502: ,

  • CVE-2013-0389: , , , ,

  • CVE-2013-0386: ,

  • CVE-2013-0385: , , , ,

  • CVE-2013-0384: , , , ,

  • CVE-2013-0383: , , , ,

  • CVE-2013-0375: , ,

  • CVE-2013-0371: ,

  • CVE-2013-0368: ,

  • CVE-2013-0367: ,

  • CVE-2012-5627: [], [], [],

  • CVE-2012-5615: [], [], [], ,

  • CVE-2012-5614: ,

  • CVE-2012-5612: [], , , ,

  • CVE-2012-5611: , , , , , , , ,

  • CVE-2012-5096: ,

  • CVE-2012-5060: ,

  • CVE-2012-4414: [], [2], [2], [2], []

  • CVE-2012-3197: ,

  • CVE-2012-3180: ,

  • CVE-2012-3177: , ,

  • CVE-2012-3173: ,

  • CVE-2012-3167: ,

  • CVE-2012-3166: ,

  • CVE-2012-3163: ,

  • CVE-2012-3160: ,

  • CVE-2012-3158: ,

  • CVE-2012-3150: ,

  • CVE-2012-2750:

  • CVE-2012-1757:

  • CVE-2012-1756:

  • CVE-2012-1735:

  • CVE-2012-1734: ,

  • CVE-2012-1705: , , , ,

  • CVE-2012-1703: ,

  • CVE-2012-1702: , , , ,

  • CVE-2012-1697:

  • CVE-2012-1690: ,

  • CVE-2012-1689: ,

  • CVE-2012-1688: ,

  • CVE-2012-0578: ,

  • CVE-2012-0574: , , , ,

  • CVE-2012-0572: , , , ,

  • CVE-2012-0540: ,

  • CVE-2010-5298:

  • CVE-2009-4484:

  • CVE-2005-0004:

  • CVE-2012-0496:

  • CVE-2012-0087: ,

  • CVE-2012-0101: ,

  • CVE-2012-0102: ,

  • CVE-2012-0115: ,

  • CVE-2012-0119: ,

  • CVE-2012-0120: ,

  • CVE-2012-0484: ,

  • CVE-2012-0485: ,

  • CVE-2012-0486:

  • CVE-2012-0487:

  • CVE-2012-0488:

  • CVE-2012-0489:

  • CVE-2012-0490: ,

  • CVE-2012-0491:

  • CVE-2012-0495:

  • CVE-2012-0112: ,

  • CVE-2012-0117:

  • CVE-2012-0114: ,

  • CVE-2012-0492: ,

  • CVE-2012-0493:

  • CVE-2012-0075: ,

  • CVE-2012-0494:

  • https://cve.mitre.org/
    Security Vulnerabilities fixed in Oracle MySQL that did not exist in MariaDB
    MariaDB 12.2
    MariaDB 12.1
    MariaDB 12.0
    MariaDB 11.8
    CVE-2023-52971
    MariaDB 11.4.6
    MariaDB 10.11.12
    CVE-2025-30722
    MariaDB 11.4.6
    MariaDB 10.11.12
    MariaDB 10.6.22
    CVE-2025-30693
    MariaDB 11.4.6
    MariaDB 10.11.12
    MariaDB 10.6.22
    CVE-2025-21490
    CVE-2012-0113
    CVE-2011-2262
    CVE-2012-0116
    CVE-2012-0118
    MariaDB 11.4.5
    MariaDB 10.6.21
    MariaDB 10.11.11

    To avoid startup failures, the loose option prefix can be specified. No error is produced in case the plugin hasn't been installed yet.

    To avoid startup failures, the loose option prefix can be specified. No error is produced in case the plugin hasn't been installed yet.

    Security Vulnerabilities Fixed in Oracle MySQL That Did Not Exist in MariaDB

    About

    CVE stands for "Common Vulnerabilities and Exposures". It is a publicly available and free to use database of known software vulnerabilities maintained at

    CPU stands for "Critical Patch Update". Oracle publishes Critical Patch Update Advisories four times a year, on the Tuesday closest to the 17th day of January, April, July and October. MySQL vulnerabilities are included in these CPU Advisories.

    Some vulnerabilities found in MySQL apply to MariaDB as well, they are listed on the Security page.

    Other vulnerabilities found in MySQL do not apply to MariaDB.

    This page lists all CVEs that were fixed in MySQL and mentioned in Oracle CPU Advisories, but that — to the best of our knowledge — were never present in MariaDB.

    Full List of CVEs Fixed in Oracle MySQL That Never Existed in MariaDB

    Not a vulnerability:

    • —

    • —

    This page is licensed: CC BY-SA / Gnu FDL

    CVE-2024-35195
  • CVE-2025-53054

  • CVE-2025-53053

  • CVE-2025-5318

  • CVE-2024-12133

  • CVE-2025-53044

  • CVE-2025-53045

  • CVE-2025-53062

  • CVE-2025-53069

  • CVE-2025-53040

  • CVE-2025-53042

  • CVE-2025-53067

  • CVE-2025-50076
  • CVE-2025-50078

  • CVE-2025-50082

  • CVE-2025-50083

  • CVE-2025-50085

  • CVE-2025-50077

  • CVE-2025-53023

  • CVE-2025-50087

  • CVE-2025-50088

  • CVE-2025-50092

  • CVE-2025-50099

  • CVE-2025-50086

  • CVE-2025-50093

  • CVE-2025-50094

  • CVE-2025-50079

  • CVE-2025-50084

  • CVE-2025-50089

  • CVE-2025-50091

  • CVE-2025-50095

  • CVE-2025-50101

  • CVE-2025-53032

  • CVE-2025-50102

  • CVE-2025-50097

  • CVE-2025-50080

  • CVE-2024-37891

  • CVE-2025-50103

  • CVE-2025-50096

  • CVE-2025-5399

  • CVE-2025-50081

  • CVE-2025-50104

  • CVE-2025-50098

  • CVE-2025-50100

  • CVE-2025-21575
  • CVE-2025-21577

  • CVE-2025-30682

  • CVE-2025-30687

  • CVE-2025-30688

  • CVE-2025-30695

  • CVE-2025-30710

  • CVE-2025-30715

  • CVE-2025-21583

  • CVE-2025-21584

  • CVE-2025-21580

  • CVE-2025-21588

  • CVE-2025-21581

  • CVE-2025-21585

  • CVE-2025-30689

  • CVE-2025-21579

  • CVE-2025-30696

  • CVE-2025-30705

  • CVE-2025-30683

  • CVE-2025-30684

  • CVE-2025-30685

  • CVE-2025-30699

  • CVE-2025-30714

  • CVE-2025-30704

  • CVE-2024-13176

  • CVE-2025-30721

  • CVE-2025-30681

  • CVE-2025-30703

  • CVE-2025-21500
  • CVE-2025-21501

  • CVE-2025-21566

  • CVE-2025-21522

  • CVE-2025-21548

  • CVE-2025-21497

  • CVE-2025-21555

  • CVE-2025-21559

  • CVE-2025-21540

  • CVE-2025-21531

  • CVE-2025-21543

  • CVE-2025-21491

  • CVE-2025-21503

  • CVE-2025-21523

  • CVE-2025-21505

  • CVE-2025-21499

  • CVE-2025-21525

  • CVE-2025-21529

  • CVE-2025-21492

  • CVE-2025-21504

  • CVE-2025-21536

  • CVE-2025-21534

  • CVE-2025-21495

  • CVE-2025-21493

  • CVE-2025-21519

  • CVE-2025-21567

  • CVE-2025-21494

  • CVE-2025-21546

  • CVE-2025-21520

  • CVE-2024-21262
  • CVE-2024-7264

  • CVE-2024-21230

  • CVE-2024-21196

  • CVE-2024-21238

  • CVE-2024-28182

  • CVE-2024-21218

  • CVE-2024-21203

  • CVE-2024-21194

  • CVE-2024-21199

  • CVE-2024-21207

  • CVE-2024-21236

  • CVE-2024-21239

  • CVE-2024-21198

  • CVE-2024-21219

  • CVE-2024-21197

  • CVE-2024-21200

  • CVE-2024-21201

  • CVE-2024-21241

  • CVE-2024-21193

  • CVE-2024-21204

  • CVE-2024-21212

  • CVE-2024-21213

  • CVE-2024-21247

  • CVE-2024-21231

  • CVE-2024-21232

  • CVE-2024-21237

  • CVE-2024-21243

  • CVE-2024-21244

  • CVE-2024-21209

  • CVE-2023-52425
  • CVE-2024-25062

  • CVE-2024-24549

  • CVE-2024-25062

  • CVE-2024-21177

  • CVE-2024-21171

  • CVE-2024-21177

  • CVE-2023-6129

  • CVE-2024-21170

  • CVE-2024-0450

  • CVE-2023-48795

  • CVE-2024-21166

  • CVE-2023-48795

  • CVE-2024-21163

  • CVE-2024-21176

  • CVE-2024-21125

  • CVE-2024-20996

  • CVE-2024-21157

  • CVE-2024-21159

  • CVE-2024-21160

  • CVE-2024-21173

  • CVE-2024-21179

  • CVE-2024-21185

  • CVE-2024-21127

  • CVE-2024-21129

  • CVE-2024-21125

  • CVE-2024-21130

  • CVE-2024-21135

  • CVE-2024-21137

  • CVE-2024-21162

  • CVE-2024-21165

  • CVE-2024-21142

  • CVE-2024-21134

  • CVE-2024-0853
  • CVE-2024-20994

  • CVE-2024-21047

  • CVE-2024-21061

  • CVE-2024-21069

  • CVE-2024-21049

  • CVE-2024-21050

  • CVE-2024-21051

  • CVE-2024-21052

  • CVE-2024-21053

  • CVE-2024-21056

  • CVE-2024-21060

  • CVE-2024-21087

  • CVE-2024-20993

  • CVE-2024-20998

  • CVE-2024-21009

  • CVE-2024-21054

  • CVE-2024-21055

  • CVE-2024-21057

  • CVE-2024-21062

  • CVE-2024-21102

  • CVE-2024-21008

  • CVE-2024-21013

  • CVE-2024-21000

  • CVE-2024-21101

  • CVE-2023-46589
  • CVE-2023-41105

  • CVE-2022-46908

  • CVE-2023-2283

  • CVE-2023-28484

  • CVE-2024-20961

  • CVE-2024-20962

  • CVE-2024-20973

  • CVE-2024-20975

  • CVE-2024-20977

  • CVE-2024-20960

  • CVE-2024-20963

  • CVE-2024-20985

  • CVE-2024-20969

  • CVE-2024-20967

  • CVE-2024-20964

  • CVE-2024-20965

  • CVE-2024-20981

  • CVE-2024-20983

  • CVE-2024-20966

  • CVE-2024-20970

  • CVE-2024-20971

  • CVE-2024-20972

  • CVE-2024-20974

  • CVE-2024-20976

  • CVE-2024-20978

  • CVE-2024-20982

  • CVE-2024-20984

  • CVE-2024-20968

  • CVE-2023-34396
  • CVE-2023-38545

  • CVE-2023-2976

  • CVE-2023-20863

  • CVE-2023-22059

  • CVE-2023-22079

  • CVE-2023-22095

  • CVE-2023-2650

  • CVE-2023-41080

  • CVE-2023-3817

  • CVE-2023-22097

  • CVE-2023-22066

  • CVE-2023-22068

  • CVE-2023-22104

  • CVE-2023-22114

  • CVE-2023-22115

  • CVE-2023-22015

  • CVE-2023-22026

  • CVE-2023-22028

  • CVE-2023-22032

  • CVE-2023-22064

  • CVE-2023-22065

  • CVE-2023-22070

  • CVE-2023-22103

  • CVE-2023-22110

  • CVE-2023-22112

  • CVE-2023-22078

  • CVE-2023-22092

  • CVE-2023-22111

  • CVE-2023-22113

  • CVE-2022-4899
  • CVE-2023-24998

  • CVE-2023-28709

  • CVE-2023-2650

  • CVE-2022-4899

  • CVE-2023-2650

  • CVE-2023-28484

  • CVE-2023-22053

  • CVE-2023-22008

  • CVE-2023-22046

  • CVE-2023-22054

  • CVE-2023-22056

  • CVE-2023-21950

  • CVE-2023-22007

  • CVE-2023-22057

  • CVE-2023-22033

  • CVE-2023-22058

  • CVE-2023-22005

  • CVE-2023-22048

  • CVE-2023-22038

  • CVE-2022-43551
  • CVE-2023-21912

  • CVE-2023-21980

  • CVE-2023-21946

  • CVE-2022-31160

  • CVE-2023-21929

  • CVE-2023-21971

  • CVE-2023-21911

  • CVE-2023-21962

  • CVE-2023-21919

  • CVE-2023-21933

  • CVE-2023-21972

  • CVE-2023-21966

  • CVE-2023-21913

  • CVE-2023-21917

  • CVE-2023-21920

  • CVE-2023-21935

  • CVE-2023-21945

  • CVE-2023-21976

  • CVE-2023-21977

  • CVE-2023-21982

  • CVE-2023-21953

  • CVE-2023-21955

  • CVE-2023-21940

  • CVE-2023-21947

  • CVE-2023-21963

  • CVE-2022-24407
  • CVE-2022-24407

  • CVE-2022-40304

  • CVE-2022-3171

  • CVE-2022-1941

  • CVE-2022-42252

  • CVE-2020-10735

  • CVE-2022-22971

  • CVE-2023-21868

  • CVE-2023-21860

  • CVE-2023-21875

  • CVE-2023-21869

  • CVE-2023-21877

  • CVE-2023-21880

  • CVE-2023-21872

  • CVE-2023-21871

  • CVE-2023-21836

  • CVE-2023-21887

  • CVE-2023-21863

  • CVE-2023-21864

  • CVE-2023-21865

  • CVE-2023-21866

  • CVE-2023-21867

  • CVE-2023-21870

  • CVE-2023-21873

  • CVE-2023-21876

  • CVE-2023-21878

  • CVE-2023-21879

  • CVE-2023-21881

  • CVE-2023-21883

  • CVE-2023-21840

  • CVE-2023-21882

  • CVE-2023-21874

  • CVE-2022-21604
  • CVE-2022-21605

  • CVE-2022-21607

  • CVE-2022-21608

  • CVE-2022-21611

  • CVE-2022-21617

  • CVE-2022-21625

  • CVE-2022-21632

  • CVE-2022-21633

  • CVE-2022-21635

  • CVE-2022-21637

  • CVE-2022-21638

  • CVE-2022-21640

  • CVE-2022-21641

  • CVE-2022-29824

  • CVE-2022-31129

  • CVE-2022-32207

  • CVE-2022-34305

  • CVE-2022-35737

  • CVE-2022-39400

  • CVE-2022-39402

  • CVE-2022-39403

  • CVE-2022-39404

  • CVE-2022-39408

  • CVE-2022-39410

  • CVE-2022-27778
  • CVE-2021-22119

  • CVE-2022-23308

  • CVE-2020-26237

  • CVE-2022-21556

  • CVE-2022-21569

  • CVE-2022-21550

  • CVE-2022-21519

  • CVE-2022-21527

  • CVE-2022-21528

  • CVE-2022-21509

  • CVE-2022-22968

  • CVE-2022-21539

  • CVE-2022-21517

  • CVE-2022-21537

  • CVE-2022-21547

  • CVE-2022-21525

  • CVE-2022-21526

  • CVE-2022-21529

  • CVE-2022-21530

  • CVE-2022-21531

  • CVE-2022-21553

  • CVE-2022-21515

  • CVE-2022-21455

  • CVE-2022-21534

  • CVE-2022-21522

  • CVE-2022-21555

  • CVE-2022-21538

  • CVE-2022-21535

  • CVE-2022-21412
  • CVE-2022-21413

  • CVE-2022-21414

  • CVE-2022-21415

  • CVE-2022-21417

  • CVE-2022-21418

  • CVE-2022-21423

  • CVE-2022-21425

  • CVE-2022-21435

  • CVE-2022-21436

  • CVE-2022-21437

  • CVE-2022-21438

  • CVE-2022-21440

  • CVE-2022-21444

  • CVE-2022-21452

  • CVE-2022-21454

  • CVE-2022-21457

  • CVE-2022-21459

  • CVE-2022-21460

  • CVE-2022-21462

  • CVE-2022-21478

  • CVE-2022-21479

  • CVE-2022-21482

  • CVE-2022-21483

  • CVE-2022-21484

  • CVE-2022-21485

  • CVE-2022-21486

  • CVE-2022-21489

  • CVE-2022-21490

  • CVE-2022-22965

  • CVE-2022-23181

  • CVE-2022-23305

  • CVE-2022-21363
  • CVE-2022-21358

  • CVE-2021-3634

  • CVE-2022-21279

  • CVE-2022-21280

  • CVE-2022-21284

  • CVE-2022-21285

  • CVE-2022-21286

  • CVE-2022-21287

  • CVE-2022-21288

  • CVE-2022-21289

  • CVE-2022-21290

  • CVE-2022-21307

  • CVE-2022-21308

  • CVE-2022-21309

  • CVE-2022-21310

  • CVE-2022-21314

  • CVE-2022-21315

  • CVE-2022-21316

  • CVE-2022-21318

  • CVE-2022-21320

  • CVE-2022-21322

  • CVE-2022-21326

  • CVE-2022-21327

  • CVE-2022-21328

  • CVE-2022-21329

  • CVE-2022-21330

  • CVE-2022-21332

  • CVE-2022-21334

  • CVE-2022-21335

  • CVE-2022-21336

  • CVE-2022-21337

  • CVE-2022-21356

  • CVE-2022-21380

  • CVE-2022-21352

  • CVE-2022-21367

  • CVE-2022-21301

  • CVE-2022-21378

  • CVE-2022-21302

  • CVE-2022-21254

  • CVE-2022-21348

  • CVE-2022-21270

  • CVE-2022-21256

  • CVE-2022-21379

  • CVE-2022-21362

  • CVE-2022-21374

  • CVE-2022-21253

  • CVE-2022-21264

  • CVE-2022-21297

  • CVE-2022-21339

  • CVE-2022-21342

  • CVE-2022-21370

  • CVE-2022-21304

  • CVE-2022-21344

  • CVE-2022-21303

  • CVE-2022-21368

  • CVE-2022-21245

  • CVE-2022-21265

  • CVE-2022-21311

  • CVE-2022-21312

  • CVE-2022-21313

  • CVE-2022-21317

  • CVE-2022-21319

  • CVE-2022-21321

  • CVE-2022-21323

  • CVE-2022-21324

  • CVE-2022-21325

  • CVE-2022-21331

  • CVE-2022-21333

  • CVE-2022-21355

  • CVE-2022-21357

  • CVE-2022-21249

  • CVE-2022-21372

  • CVE-2021-22118
  • CVE-2021-22926

  • CVE-2021-36222

  • CVE-2021-35583

  • CVE-2021-3712

  • CVE-2021-35610

  • CVE-2021-35597

  • CVE-2021-35607

  • CVE-2021-2481

  • CVE-2021-35590

  • CVE-2021-35592

  • CVE-2021-35593

  • CVE-2021-35594

  • CVE-2021-35598

  • CVE-2021-35621

  • CVE-2021-2471

  • CVE-2021-35612

  • CVE-2021-20227

  • CVE-2021-33037

  • CVE-2021-29425

  • CVE-2021-35608

  • CVE-2021-35602

  • CVE-2021-35577

  • CVE-2021-2478

  • CVE-2021-2479

  • CVE-2021-35537

  • CVE-2021-35591

  • CVE-2021-35596

  • CVE-2021-35648

  • CVE-2021-35631

  • CVE-2021-35626

  • CVE-2021-35627

  • CVE-2021-35628

  • CVE-2021-35629

  • CVE-2021-35575

  • CVE-2021-35634

  • CVE-2021-35635

  • CVE-2021-35636

  • CVE-2021-35638

  • CVE-2021-35641

  • CVE-2021-35642

  • CVE-2021-35643

  • CVE-2021-35644

  • CVE-2021-35645

  • CVE-2021-35646

  • CVE-2021-35647

  • CVE-2021-35630

  • CVE-2021-35637

  • CVE-2021-35546

  • CVE-2021-35622

  • CVE-2021-35624

  • CVE-2021-35639

  • CVE-2021-35632

  • CVE-2021-35584

  • CVE-2021-35613

  • CVE-2021-35640

  • CVE-2021-35633

  • CVE-2021-35625

  • CVE-2021-35623

  • CVE-2021-35618

  • CVE-2021-3450
  • CVE-2021-2417

  • CVE-2021-2390

  • CVE-2021-2429

  • CVE-2021-2356

  • CVE-2021-2385

  • CVE-2021-2339

  • CVE-2021-2352

  • CVE-2021-2399

  • CVE-2021-2370

  • CVE-2021-2440

  • CVE-2021-2354

  • CVE-2021-2402

  • CVE-2021-2342

  • CVE-2021-2357

  • CVE-2021-2367

  • CVE-2021-2412

  • CVE-2021-2383

  • CVE-2021-2384

  • CVE-2021-2387

  • CVE-2021-2444

  • CVE-2021-2410

  • CVE-2021-2418

  • CVE-2021-2425

  • CVE-2021-2426

  • CVE-2021-2427

  • CVE-2021-2437

  • CVE-2021-2441

  • CVE-2021-2422

  • CVE-2021-2424

  • CVE-2021-2374

  • CVE-2021-2411

  • CVE-2021-2340

  • CVE-2020-17530
  • CVE-2020-28196

  • CVE-2021-2146

  • CVE-2021-2160

  • CVE-2021-2162

  • CVE-2021-2164

  • CVE-2021-2169

  • CVE-2021-2170

  • CVE-2021-2171

  • CVE-2021-2172

  • CVE-2021-2178

  • CVE-2021-2179

  • CVE-2021-2193

  • CVE-2021-2196

  • CVE-2021-2201

  • CVE-2021-2202

  • CVE-2021-2203

  • CVE-2021-2208

  • CVE-2021-2212

  • CVE-2021-2213

  • CVE-2021-2215

  • CVE-2021-2217

  • CVE-2021-2226

  • CVE-2021-2230

  • CVE-2021-2232

  • CVE-2021-2278

  • CVE-2021-2293

  • CVE-2021-2298

  • CVE-2021-2299

  • CVE-2021-2300

  • CVE-2021-2301

  • CVE-2021-2304

  • CVE-2021-2305

  • CVE-2021-2307

  • CVE-2021-2308

  • CVE-2021-3449

  • CVE-2021-3450

  • CVE-2021-23841

  • CVE-2020-13871
  • CVE-2021-1998

  • CVE-2021-2001

  • CVE-2021-2002

  • CVE-2021-2006

  • CVE-2021-2009

  • CVE-2021-2010

  • CVE-2021-2012

  • CVE-2021-2014

  • CVE-2021-2016

  • CVE-2021-2019

  • CVE-2021-2020

  • CVE-2021-2021

  • CVE-2021-2024

  • CVE-2021-2028

  • CVE-2021-2030

  • CVE-2021-2031

  • CVE-2021-2036

  • CVE-2021-2038

  • CVE-2021-2042

  • CVE-2021-2046

  • CVE-2021-2048

  • CVE-2021-2055

  • CVE-2021-2056

  • CVE-2021-2058

  • CVE-2021-2060

  • CVE-2021-2061

  • CVE-2021-2065

  • CVE-2021-2070

  • CVE-2021-2072

  • CVE-2021-2076

  • CVE-2021-2081

  • CVE-2021-2087

  • CVE-2021-2088

  • CVE-2021-2122

  • CVE-2020-14672 2f35c37bacf0
  • CVE-2020-14760

  • CVE-2020-14769 6a0e79b462e1

  • CVE-2020-14771

  • CVE-2020-14773

  • CVE-2020-14775

  • CVE-2020-14777

  • CVE-2020-14785

  • CVE-2020-14786

  • CVE-2020-14790

  • CVE-2020-14791

  • CVE-2020-14793 9bb243a3fa25

  • CVE-2020-14794

  • CVE-2020-14799

  • CVE-2020-14800

  • CVE-2020-14804

  • CVE-2020-14809

  • CVE-2020-14814

  • CVE-2020-14821

  • CVE-2020-14827

  • CVE-2020-14828

  • CVE-2020-14829

  • CVE-2020-14830

  • CVE-2020-14836

  • CVE-2020-14837

  • CVE-2020-14838

  • CVE-2020-14839

  • CVE-2020-14844

  • CVE-2020-14845

  • CVE-2020-14846

  • CVE-2020-14848

  • CVE-2020-14852

  • CVE-2020-14853

  • CVE-2020-14860

  • CVE-2020-14861

  • CVE-2020-14866

  • CVE-2020-14867 7e730bd604e1

  • CVE-2020-14868

  • CVE-2020-14869

  • CVE-2020-14870

  • CVE-2020-14873

  • CVE-2020-14878

  • CVE-2020-14888

  • CVE-2020-14891

  • CVE-2020-14893

  • CVE-2020-5398
  • CVE-2020-14539

  • CVE-2020-14540

  • CVE-2020-14547

  • CVE-2020-14553

  • CVE-2020-14559

  • CVE-2020-14567

  • CVE-2020-14568

  • CVE-2020-14575

  • CVE-2020-14576

  • CVE-2020-14586

  • CVE-2020-14591

  • CVE-2020-14597

  • CVE-2020-14614

  • CVE-2020-14619

  • CVE-2020-14620

  • CVE-2020-14623

  • CVE-2020-14624

  • CVE-2020-14631

  • CVE-2020-14632

  • CVE-2020-14633

  • CVE-2020-14634

  • CVE-2020-14641

  • CVE-2020-14643

  • CVE-2020-14651

  • CVE-2020-14654

  • CVE-2020-14656

  • CVE-2020-14663

  • CVE-2020-14678

  • CVE-2020-14680

  • CVE-2020-14697

  • CVE-2020-14702

  • CVE-2020-14725

  • CVE-2019-17563
  • CVE-2019-19646

  • CVE-2020-2759

  • CVE-2020-2761

  • CVE-2020-2762

  • CVE-2020-2763

  • CVE-2020-2765

  • CVE-2020-2768

  • CVE-2020-2770

  • CVE-2020-2774

  • CVE-2020-2779

  • CVE-2020-2790

  • CVE-2020-2804

  • CVE-2020-2806

  • CVE-2020-2853

  • CVE-2020-2875

  • CVE-2020-2892

  • CVE-2020-2893

  • CVE-2020-2895

  • CVE-2020-2896

  • CVE-2020-2897

  • CVE-2020-2898

  • CVE-2020-2901

  • CVE-2020-2903

  • CVE-2020-2904

  • CVE-2020-2921

  • CVE-2020-2923

  • CVE-2020-2924

  • CVE-2020-2925

  • CVE-2020-2926

  • CVE-2020-2928

  • CVE-2020-2930

  • CVE-2020-2933

  • CVE-2020-2934

  • CVE-2020-2570
  • CVE-2020-2572

  • CVE-2020-2573

  • CVE-2020-2577

  • CVE-2020-2579

  • CVE-2020-2580

  • CVE-2020-2584

  • CVE-2020-2588

  • CVE-2020-2589

  • CVE-2020-2627

  • CVE-2020-2660

  • CVE-2020-2679

  • CVE-2020-2686

  • CVE-2020-2694

  • CVE-2019-2920
  • CVE-2019-2946

  • CVE-2019-2948

  • CVE-2019-2950

  • CVE-2019-2957

  • CVE-2019-2960

  • CVE-2019-2963

  • CVE-2019-2966

  • CVE-2019-2967

  • CVE-2019-2968

  • CVE-2019-2969

  • CVE-2019-2982

  • CVE-2019-2991

  • CVE-2019-2993

  • CVE-2019-2997

  • CVE-2019-2998

  • CVE-2019-3003

  • CVE-2019-3004

  • CVE-2019-3009

  • CVE-2019-3011

  • CVE-2019-3018

  • CVE-2019-5443

  • CVE-2019-8457

  • CVE-2019-10072

  • CVE-2019-2738
  • CVE-2019-2741

  • CVE-2019-2743

  • CVE-2019-2746

  • CVE-2019-2747

  • CVE-2019-2752

  • CVE-2019-2755

  • CVE-2019-2757

  • CVE-2019-2774

  • CVE-2019-2778

  • CVE-2019-2780

  • CVE-2019-2784

  • CVE-2019-2785

  • CVE-2019-2789

  • CVE-2019-2791

  • CVE-2019-2795

  • CVE-2019-2796

  • CVE-2019-2797

  • CVE-2019-2798

  • CVE-2019-2800

  • CVE-2019-2801

  • CVE-2019-2802

  • CVE-2019-2803

  • CVE-2019-2808

  • CVE-2019-2810

  • CVE-2019-2811

  • CVE-2019-2812

  • CVE-2019-2814

  • CVE-2019-2815

  • CVE-2019-2819

  • CVE-2019-2822

  • CVE-2019-2826

  • CVE-2019-2830

  • CVE-2019-2834

  • CVE-2019-2879

  • CVE-2019-3822

  • CVE-2019-2566
  • CVE-2019-2580

  • CVE-2019-2581

  • CVE-2019-2584

  • CVE-2019-2585

  • CVE-2019-2587

  • CVE-2019-2589

  • CVE-2019-2592

  • CVE-2019-2593

  • CVE-2019-2596

  • CVE-2019-2606

  • CVE-2019-2607

  • CVE-2019-2617

  • CVE-2019-2620

  • CVE-2019-2623

  • CVE-2019-2624

  • CVE-2019-2625

  • CVE-2019-2626

  • CVE-2019-2630

  • CVE-2019-2631

  • CVE-2019-2632

  • CVE-2019-2634

  • CVE-2019-2635

  • CVE-2019-2636

  • CVE-2019-2644

  • CVE-2019-2681

  • CVE-2019-2683

  • CVE-2019-2685

  • CVE-2019-2686

  • CVE-2019-2687

  • CVE-2019-2688

  • CVE-2019-2689

  • CVE-2019-2691

  • CVE-2019-2692

  • CVE-2019-2693

  • CVE-2019-2694

  • CVE-2019-2695

  • CVE-2019-2420
  • CVE-2019-2434

  • CVE-2019-2435

  • CVE-2019-2436

  • CVE-2019-2482

  • CVE-2019-2486

  • CVE-2019-2494

  • CVE-2019-2495

  • CVE-2019-2502

  • CVE-2019-2507

  • CVE-2019-2513

  • CVE-2019-2528

  • CVE-2019-2530

  • CVE-2019-2531

  • CVE-2019-2532

  • CVE-2019-2533

  • CVE-2019-2534

  • CVE-2019-2535

  • CVE-2019-2536

  • CVE-2019-2539

  • CVE-2018-3155
  • CVE-2018-3161

  • CVE-2018-3170

  • CVE-2018-3171

  • CVE-2018-3182

  • CVE-2018-3186

  • CVE-2018-3187

  • CVE-2018-3195

  • CVE-2018-3203

  • CVE-2018-3212

  • CVE-2018-3247

  • CVE-2018-3258

  • CVE-2018-3276

  • CVE-2018-3278

  • CVE-2018-3279

  • CVE-2018-3280

  • CVE-2018-3283

  • CVE-2018-3285

  • CVE-2018-3286

  • CVE-2018-8014

  • CVE-2018-11776

  • CVE-2018-3054
  • CVE-2018-3056

  • CVE-2018-3061

  • CVE-2018-3062

  • CVE-2018-3065

  • CVE-2018-3067

  • CVE-2018-3070

  • CVE-2018-3071

  • CVE-2018-3073

  • CVE-2018-3074

  • CVE-2018-3075

  • CVE-2018-3077

  • CVE-2018-3078

  • CVE-2018-3079

  • CVE-2018-3080

  • CVE-2018-3082

  • CVE-2018-3084

  • CVE-2018-2769
  • CVE-2018-2773 — See MDEV-13402

  • CVE-2018-2775

  • CVE-2018-2776

  • CVE-2018-2778

  • CVE-2018-2779

  • CVE-2018-2780

  • CVE-2018-2805

  • CVE-2018-2812

  • CVE-2018-2816

  • CVE-2018-2818

  • CVE-2018-2839

  • CVE-2018-2846

  • CVE-2018-2877

  • CVE-2018-2565
  • CVE-2018-2573

  • CVE-2018-2576

  • CVE-2018-2583

  • CVE-2018-2585

  • CVE-2018-2586

  • CVE-2018-2590

  • CVE-2018-2591

  • CVE-2018-2600

  • CVE-2018-2645

  • CVE-2018-2646

  • CVE-2018-2647

  • CVE-2018-2667

  • CVE-2018-2696

  • CVE-2018-2703

  • CVE-2017-10167
  • CVE-2017-10203

  • CVE-2017-10227

  • CVE-2017-10276

  • CVE-2017-10277

  • CVE-2017-10279

  • CVE-2017-10283

  • CVE-2017-10284

  • CVE-2017-10294

  • CVE-2017-10296

  • CVE-2017-10311

  • CVE-2017-10313

  • CVE-2017-10314

  • CVE-2017-10424

  • CVE-2017-3634
  • CVE-2017-3635

  • CVE-2017-3637

  • CVE-2017-3638

  • CVE-2017-3639

  • CVE-2017-3640

  • CVE-2017-3642

  • CVE-2017-3643

  • CVE-2017-3644

  • CVE-2017-3645

  • CVE-2017-3646

  • CVE-2017-3647

  • CVE-2017-3648

  • CVE-2017-3649

  • CVE-2017-3650

  • CVE-2017-3652

  • CVE-2017-3732

  • CVE-2017-3732

  • CVE-2017-3732

  • CVE-2017-5647

  • CVE-2017-5651

  • CVE-2017-3304
  • CVE-2017-3305

  • CVE-2017-3306

  • CVE-2017-3307

  • CVE-2017-3329

  • CVE-2017-3331

  • CVE-2017-3450

  • CVE-2017-3452

  • CVE-2017-3454

  • CVE-2017-3455

  • CVE-2017-3457

  • CVE-2017-3458

  • CVE-2017-3459

  • CVE-2017-3460

  • CVE-2017-3461

  • CVE-2017-3462

  • CVE-2017-3463

  • CVE-2017-3465

  • CVE-2017-3467

  • CVE-2017-3468

  • CVE-2017-3469

  • CVE-2017-3523

  • CVE-2017-3586

  • CVE-2017-3589

  • CVE-2017-3590

  • CVE-2017-3599

  • CVE-2017-3731

  • CVE-2017-3732

  • CVE-2017-5638

  • CVE-2016-5590
  • CVE-2016-6304

  • CVE-2016-8318

  • CVE-2016-8327

  • CVE-2017-3251

  • CVE-2017-3256

  • CVE-2017-3273

  • CVE-2017-3319

  • CVE-2017-3320

  • CVE-2017-3321

  • CVE-2017-3322

  • CVE-2017-3323

  • CVE-2016-5617
  • CVE-2016-5625

  • CVE-2016-5627

  • CVE-2016-5628

  • CVE-2016-5631

  • CVE-2016-5632

  • CVE-2016-5633

  • CVE-2016-5634

  • CVE-2016-5635

  • CVE-2016-6304

  • CVE-2016-8284

  • CVE-2016-8286

  • CVE-2016-8287

  • CVE-2016-8288

  • CVE-2016-8289

  • CVE-2016-8290

  • CVE-2016-3501
  • CVE-2016-3518

  • CVE-2016-3588

  • CVE-2016-3614

  • CVE-2016-5436

  • CVE-2016-5437

  • CVE-2016-5439

  • CVE-2016-5441

  • CVE-2016-5442

  • CVE-2016-5443

  • CVE-2016-0654
  • CVE-2016-0656

  • CVE-2016-0657

  • CVE-2016-0658

  • CVE-2016-0659

  • CVE-2016-0661

  • CVE-2016-0662

  • CVE-2016-0663

  • CVE-2016-0665

  • CVE-2016-0667

  • CVE-2016-0705

  • CVE-2016-3461

  • CVE-2016-0599
  • CVE-2016-0601

  • CVE-2016-0605

  • CVE-2016-0607

  • CVE-2016-0611

  • CVE-2015-4766
  • CVE-2015-4791

  • CVE-2015-4800

  • CVE-2015-4833

  • CVE-2015-4862

  • CVE-2015-4890

  • CVE-2015-4904

  • CVE-2015-4905

  • CVE-2015-4910

  • CVE-2015-2661
  • CVE-2015-4737

  • CVE-2015-4756

  • CVE-2015-4761

  • CVE-2015-4767

  • CVE-2015-4769

  • CVE-2015-4771

  • CVE-2015-4772

  • CVE-2015-0423
  • CVE-2015-0438

  • CVE-2015-0439

  • CVE-2015-0498

  • CVE-2015-0500

  • CVE-2015-0503

  • CVE-2015-0506

  • CVE-2015-0507

  • CVE-2015-0508

  • CVE-2015-0511

  • CVE-2015-2566

  • CVE-2015-2567

  • CVE-2015-2575

  • CVE-2015-2576

  • CVE-2014-4240
    CVE-2014-2450
  • CVE-2014-2451

  • CVE-2013-5894
  • CVE-2014-0427

  • CVE-2014-0430

  • CVE-2014-0431

  • CVE-2014-0433

  • CVE-2013-5793
    CVE-2013-3810
  • CVE-2013-3811

  • CVE-2013-2395
    October 2025
    CVE-2025-6965
    CVE-2025-4517
    CVE-2025-49796
    CVE-2025-5399
    July 2025
    CVE-2024-9287
    CVE-2025-32415
    CVE-2025-0725
    CVE-2025-50068
    April 2025
    CVE-2024-40896
    CVE-2025-30706
    CVE-2024-7254
    CVE-2025-21574
    January 2025
    CVE-2024-11053
    CVE-2024-37371
    CVE-2025-21521
    CVE-2025-21518
    October 2024
    CVE-2024-37371
    CVE-2024-5535
    CVE-2024-21272
    CVE-2024-21230
    July 2024
    CVE-2023-37920
    CVE-2024-22257
    CVE-2021-24112
    CVE-2024-22262
    April 2024
    CVE-2023-44487
    CVE-2024-21090
    CVE-2023-6129
    CVE-2024-21015
    January 2024
    CVE-2023-38545
    CVE-2023-50164
    CVE-2023-39975
    CVE-2023-5363
    October 2023
    CVE-2023-34034
    CVE-2022-42898
    CVE-2023-22102
    CVE-2023-22094
    July 2023
    CVE-2023-20862
    CVE-2022-37865
    CVE-2022-4899
    CVE-2023-0361
    April 2023
    CVE-2022-37434
    CVE-2022-43548
    CVE-2023-0215
    CVE-2022-45143
    January 2023
    CVE-2022-31692
    CVE-2022-32221
    CVE-2022-37434
    CVE-2020-36242
    October 2022
    CVE-2022-2097
    CVE-2022-21594
    CVE-2022-21599
    CVE-2022-21600
    CVE-2022-21589
    MDEV-29834
    CVE-2022-21592
    MDEV-9069
    July 2022
    CVE-2021-31805
    CVE-2022-1292
    CVE-2022-1292
    CVE-2022-21824
    April 2022
    CVE-2021-22570
    CVE-2021-41184
    CVE-2021-42340
    CVE-2021-44832
    January 2022
    CVE-2021-22946
    CVE-2021-3712
    CVE-2022-21278
    CVE-2022-21351
    October 2021
    CVE-2021-22931
    CVE-2021-3711
    CVE-2021-22112
    CVE-2021-3518
    July 2021
    CVE-2021-22884
    CVE-2021-22901
    CVE-2021-25122
    CVE-2019-17543
    Apr 2021
    CVE-2019-7317
    CVE-2020-1971
    CVE-2020-8277
    CVE-2020-17527
    Jan 2021
    CVE-2019-10086
    CVE-2020-1971
    CVE-2020-5408
    CVE-2020-5421
    Oct 2020
    CVE-2020-1730
    CVE-2020-1967
    CVE-2020-8174
    CVE-2020-13935
    Jul 2020
    CVE-2019-1551
    CVE-2020-1938
    CVE-2020-1967
    CVE-2020-5258
    Apr 2020
    CVE-2019-1547
    CVE-2019-5482
    CVE-2019-14889
    CVE-2019-15601
    Jan 2020
    CVE-2019-1547
    CVE-2019-1547
    CVE-2019-8457
    CVE-2019-16168
    Oct 2019
    CVE-2019-1543
    CVE-2019-1549
    CVE-2019-2911
    CVE-2019-2914
    July 2019
    CVE-2018-15756
    CVE-2019-1559
    CVE-2019-2730
    CVE-2019-2731
    April 2019
    CVE-2018-0734
    CVE-2018-3123
    CVE-2019-1559
    CVE-2019-1559
    January 2019
    CVE-2018-0732
    CVE-2018-0732
    CVE-2018-0734
    CVE-2018-10933
    October 2018
    CVE-2018-1258
    CVE-2018-3137
    CVE-2018-3144
    CVE-2018-3145
    July 2018
    CVE-2017-0379
    CVE-2017-5645
    CVE-2018-0739
    CVE-2018-2598
    April 2018
    CVE-2016-9878
    CVE-2017-3737
    CVE-2018-2758
    CVE-2018-2762
    January 2018
    CVE-2017-3736
    CVE-2017-3736
    CVE-2017-3737
    CVE-2017-12617
    October 2017
    CVE-2017-3731
    CVE-2017-5664
    CVE-2017-10155
    CVE-2017-10165
    July 2017
    CVE-2014-1912
    CVE-2016-4436
    CVE-2017-3529
    CVE-2017-3633
    April 2017
    CVE-2016-2176
    CVE-2016-2176
    CVE-2016-3092
    CVE-2016-6303
    January 2017
    CVE-2015-7501
    CVE-2016-0635
    CVE-2016-0714
    CVE-2016-5541
    October 2016
    CVE-2016-3495
    CVE-2016-5507
    CVE-2016-5598
    CVE-2016-5609
    July 2016
    CVE-2016-2105
    CVE-2016-3424
    CVE-2016-3440
    CVE-2016-3486
    April 2016
    CVE-2015-3194
    CVE-2016-0639
    CVE-2016-0652
    CVE-2016-0653
    January 2016
    CVE-2016-0503
    CVE-2016-0504
    CVE-2016-0594
    CVE-2016-0595
    October 2015
    CVE-2015-0286
    CVE-2015-1793
    CVE-2015-3144
    CVE-2015-4730
    July 2015
    CVE-2015-2611
    CVE-2015-2617
    CVE-2015-2639
    CVE-2015-2641
    April 2015
    CVE-2014-0112
    CVE-2014-3569
    CVE-2014-7809
    CVE-2015-0405
    October 2015
    CVE-2015-0385
    CVE-2015-0409
    July 2014
    CVE-2014-2484
    CVE-2014-4214
    CVE-2014-4233
    CVE-2014-4238
    April 2014
    CVE-2014-2434
    CVE-2014-2435
    CVE-2014-2442
    CVE-2014-2444
    January 2014
    CVE-2013-4316
    CVE-2013-5860
    CVE-2013-5881
    CVE-2013-5882
    October 2013
    CVE-2013-2251
    CVE-2013-5767
    CVE-2013-5770
    CVE-2013-5786
    July 2013
    CVE-2013-3795
    CVE-2013-3796
    CVE-2013-3798
    CVE-2013-3806
    April 2013
    CVE-2013-1566
    CVE-2013-1567
    CVE-2013-1570
    CVE-2013-2381
    October 2012
    CVE-2012-3144
    CVE-2012-3147
    CVE-2012-3149
    CVE-2012-3156
    April 2012
    CVE-2012-0583
    CVE-2012-1696
    MariaDB 11.5.0
    MariaDB 11.5
    MariaDB 11.5.0
    MariaDB 11.5
    MariaDB 10.4.7
    MariaDB 10.5.8
    11.5
    MariaDB 11.5
    11.5
    MariaDB 11.5
    MariaDB 10.4.0
    MariaDB 10.1.7
    MariaDB 10.4.9
    MariaDB 10.3.19
    MariaDB 10.2.28
    MariaDB 11.3
    MariaDB 11.3
    MariaDB 11.3
    MariaDB 10.5.2
    MariaDB 10.0
    MariaDB 10.3
    MariaDB 10.4.13
    MariaDB 10.4
    MariaDB 11.0.3
    MariaDB 11.0.4
    MariaDB 10.4.6
    MariaDB 10.2.6
    MariaDB 10.1.24
    MariaDB 10.1.18
    MariaDB 5.5.41
    MariaDB 10.0.15
    MariaDB 10.1.4
    MariaDB 10.2.16
    MariaDB 10.3.8
    MariaDB 5.5.41
    MariaDB 10.0.15
    MariaDB 10.1.4
    MariaDB 5.5.41
    MariaDB 10.0.15
    MariaDB 10.1.4
    MariaDB 11.3
    MariaDB 10.1.23
    MariaDB 10.2.6
    MariaDB 10.1.39
    MariaDB 10.2.24
    MariaDB 10.3.15
    MariaDB 10.4.5
    MariaDB 10.1.39
    MariaDB 10.2.23
    MariaDB 10.3.14
    MariaDB 10.4.4
    MariaDB 10.5.29
    MariaDB 10.5.29
    MariaDB 11.7.2
    MariaDB 5.1
    MariaDB 5.5
    MariaDB 5.1
    MariaDB 5.5
    MariaDB 5.1
    MariaDB 5.5
    MariaDB 5.1
    MariaDB 5.5
    MariaDB 5.1
    MariaDB 5.5
    MariaDB 11.7
    MariaDB 11.6
    MariaDB 11.5
    MariaDB 11.3
    MariaDB 11.2
    MariaDB 11.1
    MariaDB 11.0
    MariaDB 10.10
    MariaDB 10.9
    MariaDB 10.8
    MariaDB 10.7
    MariaDB 10.5
    MariaDB 10.4
    MariaDB 10.3
    MariaDB 10.2
    MariaDB 10.1
    MariaDB 10.0
    MariaDB 5.5
    MariaDB 5.3
    MariaDB 5.2
    MariaDB 5.1
    MariaDB 10.5.28
    MariaDB 11.2.4
    MariaDB 11.1.5
    MariaDB 11.0.6
    MariaDB 10.5.25
    MariaDB 10.5.29
    MariaDB 10.5.29
    MariaDB 11.2.3
    MariaDB 11.2.2
    MariaDB 11.1.3
    MariaDB 11.0.4
    MariaDB 10.5.23
    MariaDB 10.4.32
    MariaDB 10.10.7
    MariaDB 10.9.6
    MariaDB 10.8.8
    MariaDB 10.5.20
    MariaDB 10.4.29
    MariaDB 10.3.39
    MariaDB 10.10.4
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.3.35
    MariaDB 10.2.44
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.3.35
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.3.35
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.3.35
    MariaDB 10.2.44
    MariaDB 10.5.13
    MariaDB 10.4.22
    MariaDB 10.3.32
    MariaDB 10.2.41
    MariaDB 10.5.14
    MariaDB 10.4.23
    MariaDB 10.3.33
    MariaDB 10.2.42
    MariaDB 10.5.14
    MariaDB 10.4.23
    MariaDB 10.3.33
    MariaDB 10.2.42
    MariaDB 10.5.13
    MariaDB 10.4.22
    MariaDB 10.3.32
    MariaDB 10.2.41
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.3.35
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.3.35
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.3.35
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.3.35
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.3.35
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.3.35
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.3.35
    MariaDB 10.2.44
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.3.35
    MariaDB 10.2.44
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.3.35
    MariaDB 10.2.44
    MariaDB 10.5.13
    MariaDB 10.4.22
    MariaDB 10.3.32
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.3.35
    MariaDB 10.2.44
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.3.35
    MariaDB 10.2.44
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.3.35
    MariaDB 10.2.44
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.3.35
    MariaDB 10.2.44
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.3.35
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.3.35
    MariaDB 10.2.44
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.3.35
    MariaDB 10.2.44
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.3.35
    MariaDB 10.8.1
    MariaDB 10.7.2
    MariaDB 10.5.14
    MariaDB 10.4.23
    MariaDB 10.3.33
    MariaDB 10.2.42
    MariaDB 10.8.1
    MariaDB 10.7.2
    MariaDB 10.5.14
    MariaDB 10.4.23
    MariaDB 10.3.33
    MariaDB 10.2.42
    MariaDB 10.8.1
    MariaDB 10.7.2
    MariaDB 10.5.14
    MariaDB 10.4.23
    MariaDB 10.3.33
    MariaDB 10.2.42
    MariaDB 10.8.1
    MariaDB 10.7.2
    MariaDB 10.5.14
    MariaDB 10.4.23
    MariaDB 10.3.33
    MariaDB 10.2.42
    MariaDB 10.7.2
    MariaDB 10.5.14
    MariaDB 10.4.23
    MariaDB 10.3.33
    MariaDB 10.2.42
    MariaDB 10.5.10
    MariaDB 10.4.19
    MariaDB 10.3.29
    MariaDB 10.2.38
    MariaDB 10.5.7
    MariaDB 10.4.25
    MariaDB 10.3.35
    MariaDB 10.2.44
    MariaDB 10.7.2
    MariaDB 10.5.14
    MariaDB 10.4.23
    MariaDB 10.3.33
    MariaDB 10.2.42
    MariaDB 10.7.4
    MariaDB 10.5.16
    MariaDB 10.4.25
    MariaDB 10.3.35
    MariaDB 10.2.44
    MariaDB 10.7.3
    MariaDB 10.5.15
    MariaDB 10.4.24
    MariaDB 10.3.34
    MariaDB 10.2.43
    MariaDB 10.5.13
    MariaDB 10.4.22
    MariaDB 10.3.32
    MariaDB 10.2.41
    MariaDB 10.5.11
    MariaDB 10.4.20
    MariaDB 10.3.30
    MariaDB 10.2.39
    MariaDB 10.7.3
    MariaDB 10.5.15
    MariaDB 10.4.24
    MariaDB 10.3.34
    MariaDB 10.2.43
    MariaDB 10.7.3
    MariaDB 10.5.15
    MariaDB 10.4.24
    MariaDB 10.3.34
    MariaDB 10.2.43
    MariaDB 10.7.3
    MariaDB 10.5.15
    MariaDB 10.4.24
    MariaDB 10.3.34
    MariaDB 10.2.43
    MariaDB 10.5.13
    MariaDB 10.4.22
    MariaDB 10.3.32
    MariaDB 10.7.3
    MariaDB 10.5.15
    MariaDB 10.4.24
    MariaDB 10.3.34
    MariaDB 10.2.43
    MariaDB 10.8.1
    MariaDB 10.7.2
    MariaDB 10.5.14
    MariaDB 10.4.23
    MariaDB 10.3.33
    MariaDB 10.2.42
    MariaDB 10.5.12
    MariaDB 10.4.21
    MariaDB 10.3.31
    MariaDB 10.2.40
    MariaDB 10.5.11
    MariaDB 10.4.20
    MariaDB 10.3.30
    MariaDB 10.2.39
    MariaDB 10.5.13
    MariaDB 10.4.22
    MariaDB 10.3.32
    MariaDB 10.2.41
    MariaDB 10.5.9
    MariaDB 10.4.18
    MariaDB 10.3.28
    MariaDB 10.2.37
    MariaDB 10.5.12
    MariaDB 10.4.21
    MariaDB 10.3.31
    MariaDB 10.2.40
    MariaDB 10.5.12
    MariaDB 10.4.21
    MariaDB 10.3.31
    MariaDB 10.2.40
    MariaDB 10.5.7
    MariaDB 10.4.16
    MariaDB 10.3.26
    MariaDB 10.2.35
    MariaDB 10.2.38
    MariaDB 10.2.18
    MariaDB 10.5.10
    MariaDB 10.4.19
    MariaDB 10.3.29
    MariaDB 10.2.38
    MariaDB 10.5.10
    MariaDB 10.4.19
    MariaDB 10.3.29
    MariaDB 10.2.38
    MariaDB 5.5.66
    MariaDB 10.4.9
    MariaDB 10.3.19
    MariaDB 10.2.28
    MariaDB 10.1.42
    MariaDB 10.5.5
    MariaDB 10.4.14
    MariaDB 10.3.24
    MariaDB 10.2.33
    MariaDB 10.1.46
    MariaDB Connector/C 3.0.5
    MariaDB 5.5.61
    MariaDB 10.2.15
    MariaDB 10.1.33
    MariaDB 10.0.35
    MariaDB Connector/C 3.1.3
    MariaDB 5.5.65
    MariaDB 10.4.7
    MariaDB 10.3.17
    MariaDB 10.2.26
    MariaDB 10.1.41
    MariaDB 10.4.12
    MariaDB Connector/C 3.1.3
    MariaDB 5.5.65
    MariaDB 10.4.7
    MariaDB 10.3.17
    MariaDB 10.2.26
    MariaDB 10.1.41
    MariaDB 10.5.7
    MariaDB 10.4.16
    MariaDB 10.3.26
    MariaDB 10.2.35
    MariaDB 10.1.48
    MariaDB 10.4.13
    MariaDB 10.3.23
    MariaDB 10.2.32
    MariaDB 10.1.45
    MariaDB 5.5.68
    MariaDB 10.4.13
    MariaDB 10.3.23
    MariaDB 10.2.32
    MariaDB 10.1.45
    MariaDB 5.5.66
    MariaDB 10.4.9
    MariaDB 10.3.19
    MariaDB 10.2.28
    MariaDB 10.1.42
    MariaDB 10.4.13
    MariaDB 10.3.23
    MariaDB 10.2.32
    MariaDB Connector/C 3.1.8
    MariaDB 5.5.68
    MariaDB 10.4.13
    MariaDB 10.3.23
    MariaDB 10.2.32
    MariaDB 10.1.45
    MariaDB Connector/C 3.1.7
    MariaDB 5.5.67
    MariaDB 10.4.12
    MariaDB 10.3.22
    MariaDB 10.2.31
    MariaDB 10.1.44
    MariaDB 10.5.6
    MariaDB 10.4.15
    MariaDB 10.3.25
    MariaDB 10.2.34
    MariaDB 10.1.47
    MariaDB 10.5.7
    MariaDB 10.4.16
    MariaDB 10.3.26
    MariaDB 10.2.35
    MariaDB 10.1.48
    MariaDB 10.5.7
    MariaDB 10.4.16
    MariaDB 10.3.26
    MariaDB 10.2.35
    MariaDB 10.5.7
    MariaDB 10.4.16
    MariaDB 10.3.26
    MariaDB 10.2.35
    MariaDB 10.5.7
    MariaDB 10.4.16
    MariaDB 10.3.26
    MariaDB 10.2.35
    MariaDB 10.1.48
    MariaDB Connector/C 3.0.5
    MariaDB 5.5.61
    MariaDB 10.2.15
    MariaDB 10.1.33
    MariaDB 10.0.35
    MariaDB Connector/C 3.1.8
    MariaDB 10.4.13
    MariaDB 10.3.23
    MariaDB 10.2.32
    MariaDB 5.5.66
    MariaDB 10.4.9
    MariaDB 10.3.19
    MariaDB 10.2.28
    MariaDB 10.1.42
    MariaDB 10.4.9
    MariaDB 10.3.19
    MariaDB 10.2.28
    MariaDB 5.5.65
    MariaDB 10.4.7
    MariaDB 10.3.17
    MariaDB 10.2.26
    MariaDB 10.1.41
    MariaDB 10.4.7
    MariaDB 10.3.17
    MariaDB 10.2.26
    MariaDB 5.5.65
    MariaDB 10.4.7
    MariaDB 10.3.17
    MariaDB 10.2.26
    MariaDB 10.1.41
    MariaDB 5.5.65
    MariaDB 10.4.7
    MariaDB 10.3.17
    MariaDB 10.2.26
    MariaDB 10.1.41
    MariaDB 5.5.65
    MariaDB 10.4.7
    MariaDB 10.3.17
    MariaDB 10.2.26
    MariaDB 10.1.41
    MariaDB 10.4.5
    MariaDB 10.3.15
    MariaDB 10.2.24
    MariaDB 5.5.64
    MariaDB 10.4.5
    MariaDB 10.3.15
    MariaDB 10.2.24
    MariaDB 10.1.39
    MariaDB 5.5.64
    MariaDB 10.4.5
    MariaDB 10.3.15
    MariaDB 10.2.24
    MariaDB 10.1.39
    MariaDB 10.3.13
    MariaDB 10.2.22
    MariaDB 10.1.38
    MariaDB 10.0.38
    MariaDB 5.5.63
    MariaDB 10.1.38
    MariaDB 10.0.38
    MariaDB 10.3.13
    MariaDB 10.2.22
    MariaDB 5.5.62
    MariaDB 10.3.10
    MariaDB 10.2.18
    MariaDB 10.1.36
    MariaDB 10.0.37
    MariaDB 5.5.37
    MariaDB 5.5.60
    MariaDB 10.2.15
    MariaDB 10.1.33
    MariaDB 10.0.35
    MariaDB 10.3.11
    MariaDB 10.2.19
    MariaDB 5.5.62
    MariaDB 10.3.11
    MariaDB 10.2.19
    MariaDB 10.1.37
    MariaDB 10.0.37
    MariaDB 10.3.11
    MariaDB 10.2.19
    MariaDB 10.3.11
    MariaDB 10.2.19
    MariaDB 10.1.37
    MariaDB 10.0.37
    MariaDB 10.3.11
    MariaDB 10.2.19
    MariaDB 10.3.11
    MariaDB 10.2.19
    MariaDB 5.5.62
    MariaDB 10.3.11
    MariaDB 10.2.19
    MariaDB 10.1.37
    MariaDB 10.0.37
    MariaDB 10.3.11
    MariaDB 10.2.19
    MariaDB 10.3.11
    MariaDB 10.2.19
    MariaDB 10.3.11
    MariaDB 10.2.19
    MariaDB 10.1.37
    MariaDB 10.0.37
    MariaDB 10.3.11
    MariaDB 10.2.19
    MariaDB 10.1.37
    MariaDB 10.0.37
    MariaDB 5.5.59
    MariaDB 10.2.12
    MariaDB 10.1.30
    MariaDB 10.0.34
    MariaDB Connector/C 3.0.5
    MariaDB Connector/C 2.3.7
    2
    MariaDB 5.5.61
    MariaDB 10.2.15
    MariaDB 10.1.33
    MariaDB 10.0.35
    MariaDB 5.5.61
    MariaDB 10.3.9
    MariaDB 10.2.17
    MariaDB 10.1.35
    MariaDB 10.0.36
    MariaDB 10.3.9
    MariaDB 10.2.17
    MariaDB 10.1.35
    MariaDB 10.0.36
    MariaDB 5.5.61
    MariaDB 10.3.9
    MariaDB 10.2.17
    MariaDB 10.1.35
    MariaDB 10.0.36
    MariaDB 10.3.9
    MariaDB 10.2.17
    MariaDB 5.5.61
    MariaDB 10.3.9
    MariaDB 10.2.17
    MariaDB 10.1.35
    MariaDB 10.0.36
    MariaDB 5.5.60
    MariaDB 10.2.15
    MariaDB 10.1.33
    MariaDB 10.0.35
    MariaDB 5.5.60
    MariaDB 10.2.15
    MariaDB 10.1.33
    MariaDB 10.0.35
    MariaDB 5.5.60
    MariaDB 10.2.15
    MariaDB 10.1.33
    MariaDB 10.0.35
    MariaDB 10.2.15
    MariaDB 10.2.15
    MariaDB 10.1.33
    MariaDB 10.0.35
    MariaDB 10.2.15
    MariaDB 10.2.15
    MariaDB 10.1.33
    MariaDB 10.0.35
    MariaDB 10.2.15
    MariaDB 10.1.33
    MariaDB 10.0.35
    MariaDB 5.5.60
    MariaDB 10.2.15
    MariaDB 10.1.33
    MariaDB 10.0.35
    MariaDB 10.2.15
    MariaDB 5.5.60
    MariaDB 10.2.15
    MariaDB 10.1.33
    MariaDB 10.0.35
    MariaDB 5.5.60
    MariaDB 10.2.15
    MariaDB 10.1.33
    MariaDB 10.0.35
    MariaDB 10.2.15
    MariaDB 10.1.33
    MariaDB 10.0.35
    MariaDB 5.5.60
    MariaDB 10.2.15
    MariaDB 10.1.33
    MariaDB 10.0.35
    MariaDB 10.2.15
    MariaDB 5.5.60
    MariaDB 10.2.15
    MariaDB 10.1.33
    MariaDB 10.0.35
    MariaDB 5.5.59
    MariaDB 10.2.13
    MariaDB 10.1.31
    MariaDB 10.0.34
    MariaDB 5.5.59
    MariaDB 10.2.13
    MariaDB 10.1.31
    MariaDB 10.0.34
    MariaDB 5.5.59
    MariaDB 10.2.13
    MariaDB 10.1.31
    MariaDB 10.0.34
    MariaDB 5.5.59
    MariaDB 10.2.13
    MariaDB 10.1.31
    MariaDB 10.0.34
    MariaDB 10.2.13
    MariaDB 10.1.31
    MariaDB 10.0.34
    MariaDB 5.5.59
    MariaDB 10.2.13
    MariaDB 10.1.31
    MariaDB 10.0.34
    MariaDB Connector/C 3.3.1
    MariaDB Connector/C 3.2.7
    MariaDB Connector/C 3.1.17
    MariaDB 5.5.57
    MariaDB 10.2.8
    MariaDB 10.1.26
    MariaDB 10.0.32
    MariaDB 5.5.53
    MariaDB 10.1.19
    MariaDB 10.0.28
    MariaDB 5.5.57
    MariaDB 10.2.8
    MariaDB 10.1.26
    MariaDB 10.0.32
    MariaDB 5.5.57
    MariaDB 10.2.8
    MariaDB 10.1.26
    MariaDB 10.0.32
    MariaDB 5.5.53
    MariaDB 10.1.19
    MariaDB 10.0.28
    MariaDB 5.5.55
    MariaDB 10.2.6
    MariaDB 10.1.23
    MariaDB 10.0.31
    MariaDB 5.5.55
    MariaDB 10.2.6
    MariaDB 10.1.23
    MariaDB 10.0.31
    MariaDB 5.5.55
    MariaDB 10.2.6
    MariaDB 10.1.23
    MariaDB 10.0.31
    MariaDB 5.5.54
    MariaDB 10.1.21
    MariaDB 10.0.29
    MariaDB 5.5.54
    MariaDB 10.1.21
    MariaDB 10.0.29
    MariaDB 5.5.55
    MariaDB 10.2.5
    MariaDB 10.1.22
    MariaDB 10.0.30
    MariaDB 5.5.54
    MariaDB 10.1.21
    MariaDB 10.0.29
    MariaDB 5.5.55
    MariaDB 10.2.6
    MariaDB 10.1.23
    MariaDB 10.0.31
    MariaDB 5.5.55
    MariaDB 10.2.6
    MariaDB 10.1.23
    MariaDB 10.0.31
    MariaDB 5.5.55
    MariaDB 10.2.5
    MariaDB 10.1.22
    MariaDB 10.0.30
    MariaDB 5.5.54
    MariaDB 10.1.21
    MariaDB 10.0.29
    MariaDB 5.5.54
    MariaDB 10.1.21
    MariaDB 10.0.29
    MariaDB 5.5.54
    MariaDB 10.1.21
    MariaDB 10.0.29
    MariaDB 10.2.8
    MariaDB 10.1.21
    MariaDB 10.0.29
    MariaDB 5.5.54
    MariaDB 10.1.21
    MariaDB 10.0.29
    MariaDB 5.5.54
    MariaDB 10.1.21
    MariaDB 10.0.29
    MariaDB 5.5.54
    MariaDB 10.1.21
    MariaDB 10.0.29
    MariaDB 10.2.10
    MariaDB 10.1.30
    MariaDB 5.5.57
    MariaDB 10.2.8
    MariaDB 10.1.26
    MariaDB 10.0.32
    MariaDB 5.5.57
    MariaDB 10.2.8
    MariaDB 10.1.26
    MariaDB 10.0.32
    MariaDB 5.5.58
    MariaDB 10.2.10
    MariaDB 10.1.29
    MariaDB 10.0.33
    MariaDB 10.2.8
    MariaDB 10.2.8
    MariaDB 10.2.8
    MariaDB 10.1.26
    MariaDB 10.0.32
    MariaDB 5.5.58
    MariaDB 10.2.10
    MariaDB 10.1.29
    MariaDB 10.0.33
    MariaDB 5.5.62
    MariaDB 10.3.11
    MariaDB 10.2.19
    MariaDB 10.1.37
    MariaDB 10.0.37
    MariaDB 5.5.52
    MariaDB 10.1.18
    MariaDB 10.0.28
    MariaDB 5.5.53
    MariaDB 10.1.19
    MariaDB 10.0.28
    MariaDB 5.5.54
    MariaDB 10.1.21
    MariaDB 10.0.29
    MariaDB 5.5.52
    MariaDB 10.1.18
    MariaDB 10.0.28
    MariaDB 5.5.51
    MariaDB 10.1.17
    MariaDB 10.0.27
    MariaDB 10.0.27
    MariaDB 5.5.52
    MariaDB 10.1.18
    MariaDB 10.0.28
    MariaDB 5.5.52
    MariaDB 10.1.18
    MariaDB 10.0.28
    MariaDB 5.5.52
    MariaDB 10.1.18
    MariaDB 10.0.28
    MariaDB 5.5.52
    MariaDB 10.1.18
    MariaDB 10.0.28
    MariaDB 5.5.51
    MariaDB 10.0.27
    MariaDB 5.5.53
    MariaDB 10.1.19
    MariaDB 10.0.28
    MariaDB 5.5.53
    MariaDB 10.1.19
    MariaDB 10.0.28
    MariaDB 5.5.49
    MariaDB 5.5.50
    MariaDB 10.1.15
    MariaDB 10.0.26
    MariaDB 5.5.50
    MariaDB 10.1.15
    MariaDB 10.0.26
    MariaDB 5.5.50
    MariaDB 10.1.15
    MariaDB 10.0.26
    MariaDB 5.5.52
    MariaDB 10.1.18
    MariaDB 10.0.28
    MariaDB 5.5.50
    MariaDB 10.1.15
    MariaDB 10.0.26
    MariaDB 5.5.46
    MariaDB 10.1.9
    MariaDB 10.0.22
    MariaDB 5.5.49
    MariaDB 5.5.47
    MariaDB 10.1.10
    MariaDB 10.0.23
    MariaDB 10.1.12
    MariaDB 5.5.49
    MariaDB 5.5.47
    MariaDB 10.1.10
    MariaDB 10.0.23
    MariaDB 5.5.48
    MariaDB 10.1.12
    MariaDB 5.5.48
    MariaDB 10.1.12
    MariaDB 5.5.49
    MariaDB 5.5.49
    MariaDB 5.5.48
    MariaDB 10.1.12
    MariaDB 5.5.48
    MariaDB 10.1.12
    MariaDB 5.5.49
    MariaDB 5.5.47
    MariaDB 10.1.10
    MariaDB 10.0.23
    MariaDB 5.5.48
    MariaDB 10.1.12
    MariaDB 5.5.48
    MariaDB 10.1.12
    MariaDB 5.5.47
    MariaDB 10.1.10
    MariaDB 10.0.23
    MariaDB 10.1.9
    MariaDB 10.0.22
    MariaDB 5.5.47
    MariaDB 10.1.10
    MariaDB 10.0.23
    MariaDB 5.5.47
    MariaDB 10.1.10
    MariaDB 10.0.23
    MariaDB 5.5.47
    MariaDB 10.1.10
    MariaDB 10.0.23
    MariaDB 5.5.47
    MariaDB 10.1.10
    MariaDB 10.0.23
    MariaDB 5.5.47
    MariaDB 10.1.10
    MariaDB 10.0.23
    MariaDB 5.5.47
    MariaDB 10.1.10
    MariaDB 10.0.23
    MariaDB 5.5.47
    MariaDB 10.1.10
    MariaDB 10.0.23
    MariaDB 5.5.47
    MariaDB 10.1.10
    MariaDB 10.0.23
    MariaDB 5.5.47
    MariaDB 10.1.10
    MariaDB 10.0.23
    MariaDB 5.5.32
    MariaDB 10.0.4
    MariaDB 5.5.46
    MariaDB 10.1.9
    MariaDB 10.0.22
    MariaDB 5.5.46
    MariaDB 10.1.8
    MariaDB 10.0.22
    MariaDB 10.1.8
    MariaDB 10.0.21
    MariaDB 5.5.45
    MariaDB 10.1.8
    MariaDB 10.0.21
    MariaDB 5.5.46
    MariaDB 10.1.8
    MariaDB 10.0.22
    MariaDB 10.1.8
    MariaDB 10.0.18
    MariaDB 5.5.44
    MariaDB 10.1.8
    MariaDB 10.0.20
    MariaDB 5.5.46
    MariaDB 10.1.8
    MariaDB 10.0.22
    MariaDB 5.5.46
    MariaDB 10.1.8
    MariaDB 10.0.22
    MariaDB 5.5.46
    MariaDB 10.1.8
    MariaDB 10.0.22
    MariaDB 5.5.46
    MariaDB 10.1.8
    MariaDB 10.0.22
    MariaDB 5.5.46
    MariaDB 10.1.8
    MariaDB 10.0.22
    MariaDB 5.5.45
    MariaDB 10.1.8
    MariaDB 10.0.21
    MariaDB 5.5.45
    MariaDB 10.1.8
    MariaDB 10.0.21
    MariaDB 5.5.46
    MariaDB 10.1.8
    MariaDB 10.0.22
    MariaDB 5.5.46
    MariaDB 10.1.8
    MariaDB 10.0.22
    MariaDB 5.5.46
    MariaDB 10.1.8
    MariaDB 10.0.22
    MariaDB 5.5.46
    MariaDB 10.1.8
    MariaDB 10.0.22
    MariaDB 5.5.43
    MariaDB 10.0.18
    MariaDB 5.5.44
    MariaDB 10.0.20
    MariaDB 5.5.44
    MariaDB 10.0.20
    MariaDB 5.5.44
    MariaDB 10.0.20
    MariaDB 5.5.44
    MariaDB 10.0.20
    MariaDB 5.5.44
    MariaDB 10.0.20
    MariaDB 5.5.44
    MariaDB 10.0.20
    MariaDB 5.5.42
    MariaDB 10.0.17
    MariaDB 5.5.43
    MariaDB 10.0.18
    MariaDB 5.5.42
    MariaDB 10.0.17
    MariaDB 10.0.18
    MariaDB 10.0.18
    MariaDB 5.5.43
    MariaDB 10.0.18
    MariaDB 5.5.43
    MariaDB 10.0.18
    MariaDB 5.5.43
    MariaDB 10.0.18
    MariaDB 5.5.42
    MariaDB 10.0.17
    MariaDB 5.5.42
    MariaDB 10.0.17
    MariaDB 5.5.41
    MariaDB 10.0.16
    MariaDB 5.5.41
    MariaDB 10.0.16
    MariaDB 5.5.39
    MariaDB 10.0.13
    MariaDB 5.5.41
    MariaDB 10.0.16
    MariaDB 5.5.41
    MariaDB 10.0.16
    MariaDB 5.5.41
    MariaDB 10.0.16
    MariaDB 10.0.18
    MariaDB 5.5.41
    MariaDB 10.0.16
    MariaDB 10.0.13
    MariaDB 5.5.40
    MariaDB 10.0.15
    MariaDB 5.5.40
    MariaDB 10.0.15
    MariaDB 5.5.39
    MariaDB 10.0.13
    MariaDB 5.5.39
    MariaDB 10.0.13
    MariaDB 5.5.39
    MariaDB 10.0.13
    MariaDB 5.5.40
    MariaDB 10.0.15
    MariaDB 5.5.39
    MariaDB 10.0.13
    MariaDB 5.5.40
    MariaDB 10.0.15
    MariaDB 5.5.40
    MariaDB 10.0.15
    MariaDB 5.5.39
    MariaDB 10.0.13
    MariaDB 5.5.40
    MariaDB 10.0.15
    MariaDB 5.5.40
    MariaDB 10.0.15
    MariaDB 10.0.13
    MariaDB 5.5.39
    MariaDB 10.0.13
    MariaDB 5.5.39
    MariaDB 10.0.13
    MariaDB 10.0.13
    MariaDB 5.5.40
    MariaDB 10.0.15
    MariaDB 5.5.40
    MariaDB 10.0.15
    MariaDB 5.5.39
    MariaDB 10.0.13
    MariaDB 5.5.39
    MariaDB 10.0.13
    MariaDB 5.5.39
    MariaDB 10.0.13
    MariaDB 5.5.38
    MariaDB 10.0.12
    MariaDB 5.5.38
    MariaDB 10.0.12
    MariaDB 5.5.36
    MariaDB 10.0.9
    MariaDB 5.5.38
    MariaDB 10.0.12
    MariaDB 10.0.13
    MariaDB 5.5.38
    MariaDB 10.0.12
    MariaDB 5.5.37
    MariaDB 5.5.36
    MariaDB 10.0.9
    MariaDB 5.5.37
    MariaDB 5.5.36
    MariaDB 10.0.9
    MariaDB 5.5.37
    MariaDB 5.5.37
    MariaDB 5.5.36
    MariaDB 10.0.9
    MariaDB 5.5.35
    MariaDB 10.0.8
    MariaDB 5.5.35
    MariaDB 10.0.8
    MariaDB 5.5.35
    MariaDB 10.0.8
    MariaDB 5.5.34
    MariaDB 10.0.7
    MariaDB 5.5.35
    MariaDB 10.0.8
    MariaDB 5.5.34
    MariaDB 10.0.7
    MariaDB 5.5.34
    MariaDB 10.0.7
    MariaDB 5.5.36
    MariaDB 10.0.9
    MariaDB 10.0.13
    MariaDB 10.0.13
    MariaDB 10.0.13
    MariaDB 10.0.13
    MariaDB 5.5.35
    MariaDB 10.0.8
    MariaDB 5.5.34
    MariaDB 10.0.7
    MariaDB 5.5.33
    MariaDB 10.0.5
    MariaDB 5.5.33
    MariaDB 10.0.5
    MariaDB 5.5.32
    MariaDB 10.0.4
    MariaDB 5.5.32
    MariaDB 10.0.4
    MariaDB 5.5.31
    MariaDB 10.0.3
    MariaDB 5.5.31
    MariaDB 10.0.3
    MariaDB 5.5.32
    MariaDB 10.0.4
    MariaDB 5.5.32
    MariaDB 10.0.4
    MariaDB 5.5.31
    MariaDB 10.0.3
    MariaDB 5.5.31
    MariaDB 10.0.3
    MariaDB 5.5.32
    MariaDB 10.0.4
    MariaDB 5.5.32
    MariaDB 10.0.4
    MariaDB 5.5.31
    MariaDB 10.0.3
    MariaDB 5.5.31
    MariaDB 10.0.3
    MariaDB 5.5.31
    MariaDB 10.0.3
    MariaDB 5.5.30
    MariaDB 10.0.2
    MariaDB 5.5.31
    MariaDB 10.0.3
    MariaDB 5.5.31
    MariaDB 10.0.3
    MariaDB 5.5.32
    MariaDB 10.0.4
    MariaDB 5.5.30
    MariaDB 10.0.2
    MariaDB 5.5.30
    MariaDB 10.0.2
    MariaDB 5.5.27
    MariaDB 5.1.66
    MariaDB 5.5.31
    MariaDB 10.0.3
    MariaDB 5.5.31
    MariaDB 10.0.3
    MariaDB 5.5.29
    MariaDB 5.3.12
    MariaDB 5.2.14
    MariaDB 5.1.67
    MariaDB 10.0.1
    MariaDB 5.5.30
    MariaDB 10.0.2
    MariaDB 5.5.30
    MariaDB 10.0.2
    MariaDB 5.5.30
    MariaDB 10.0.2
    MariaDB 5.5.30
    MariaDB 10.0.2
    MariaDB 5.5.31
    MariaDB 10.0.3
    MariaDB 5.5.30
    MariaDB 10.0.2
    MariaDB 5.5.31
    MariaDB 10.0.3
    MariaDB 5.5.29
    MariaDB 5.3.12
    MariaDB 5.2.14
    MariaDB 5.1.67
    MariaDB 10.0.1
    MariaDB 5.5.29
    MariaDB 10.0.1
    MariaDB 5.5.29
    MariaDB 5.3.12
    MariaDB 5.2.14
    MariaDB 5.1.67
    MariaDB 10.0.1
    MariaDB 5.5.29
    MariaDB 5.3.12
    MariaDB 5.2.14
    MariaDB 5.1.67
    MariaDB 10.0.1
    MariaDB 5.5.29
    MariaDB 5.3.12
    MariaDB 5.2.14
    MariaDB 5.1.67
    MariaDB 10.0.1
    MariaDB 5.3.12
    MariaDB 5.2.14
    MariaDB 5.1.67
    MariaDB 5.5.29
    MariaDB 10.0.1
    MariaDB 5.5.29
    MariaDB 10.0.1
    MariaDB 5.5.29
    MariaDB 10.0.1
    MariaDB 5.5.29
    2
    MariaDB 5.3.12
    2
    MariaDB 5.2.14
    2
    MariaDB 10.0.1
    MariaDB 5.5.29
    2
    MariaDB 5.3.12
    2
    MariaDB 5.2.14
    2
    MariaDB 10.0.13
    MariaDB 10.0.1
    MariaDB 5.5.30
    MariaDB 10.0.2
    MariaDB 5.5.29
    2
    MariaDB 5.3.12
    MariaDB 5.2.14
    MariaDB 5.1.67
    MariaDB 10.0.1
    MariaDB 5.5.29
    MariaDB 5.5.28
    MariaDB 5.3.12
    MariaDB 5.3.11
    MariaDB 5.2.14
    MariaDB 5.2.13
    MariaDB 5.1.67
    MariaDB 5.1.66
    MariaDB 10.0.1
    MariaDB 5.5.29
    MariaDB 10.0.1
    MariaDB 5.5.28
    MariaDB 5.1.66
    MariaDB 5.5.27
    2
    MariaDB 5.3.8
    MariaDB 5.2.13
    MariaDB 5.1.66
    MariaDB 10.0.0
    2
    MariaDB 5.5.27
    MariaDB 5.1.66
    MariaDB 5.5.28
    MariaDB 5.1.66
    MariaDB 5.5.28
    MariaDB 5.5.27
    MariaDB 5.1.66
    MariaDB 5.5.27
    MariaDB 5.1.66
    MariaDB 5.5.27
    MariaDB 5.1.66
    MariaDB 5.5.27
    MariaDB 5.1.66
    MariaDB 5.5.27
    MariaDB 5.1.66
    MariaDB 5.5.28
    MariaDB 5.1.66
    MariaDB 5.5.27
    MariaDB 5.1.66
    MariaDB 5.5.27
    MariaDB 5.1.66
    MariaDB 5.5.23
    MariaDB 5.5.24
    MariaDB 5.5.24
    MariaDB 5.5.24
    MariaDB 5.5.24
    MariaDB 5.1.66
    MariaDB 5.5.29
    MariaDB 5.3.12
    MariaDB 5.2.14
    MariaDB 5.1.67
    MariaDB 10.0.1
    MariaDB 5.5.22
    MariaDB 5.1.62
    MariaDB 5.5.29
    MariaDB 5.3.12
    MariaDB 5.2.14
    MariaDB 5.1.67
    MariaDB 10.0.1
    MariaDB 5.5.22
    MariaDB 5.5.22
    MariaDB 5.1.62
    MariaDB 5.5.23
    MariaDB 5.1.66
    MariaDB 5.5.22
    MariaDB 5.1.62
    MariaDB 5.5.29
    MariaDB 10.0.1
    MariaDB 5.5.29
    MariaDB 5.3.12
    MariaDB 5.2.14
    MariaDB 5.1.67
    MariaDB 10.0.1
    MariaDB 5.5.29
    MariaDB 5.3.12
    MariaDB 5.2.14
    MariaDB 5.1.67
    MariaDB 10.0.1
    MariaDB 5.5.24
    MariaDB 5.1.66
    MariaDB 10.0.13
    MariaDB 5.1.42
    MariaDB 5.5.66
    MariaDB 5.5
    MariaDB 5.1
    MariaDB 5.1
    MariaDB 5.1
    MariaDB 5.1
    MariaDB 5.1
    MariaDB 5.1
    MariaDB 5.1
    MariaDB 5.5
    MariaDB 5.1
    MariaDB 5.5
    MariaDB 5.1
    MariaDB 5.5
    MariaDB 5.1
    MariaDB 5.5
    MariaDB 5.1
    MariaDB 5.5
    MariaDB 5.5
    MariaDB 5.5
    MariaDB 5.5
    MariaDB 5.5
    MariaDB 5.1
    MariaDB 5.5
    MariaDB 5.5
    MariaDB 5.5
    MariaDB 5.1
    MariaDB 5.5
    MariaDB 5.5
    MariaDB 5.1
    MariaDB 5.5
    MariaDB 5.1
    MariaDB 5.5
    MariaDB 5.5
    MariaDB 5.1
    MariaDB 5.5
    MariaDB 5.5