All pages
Powered by GitBook
1 of 3

Loading...

Loading...

Loading...

MariaDB Replication & Cluster Plugins

This section covers plugins specifically designed for high availability and clustering, including the wsrep_provider plugin used for Galera Cluster integration.

WSREP_INFO Plugin

The WSREP_INFO plugin adds the WSREP_MEMBERSHIP and WSREP_STATUS tables to the Information Schema, providing detailed insights into Galera Cluster membership and status.

The WSREP_INFO plugin library contains the following plugins:

  • WSREP_MEMBERSHIP

  • WSREP_STATUS

The WSREP_MEMBERSHIP plugin creates the WSREP_MEMBERSHIP table in the database. The plugin also adds the statement.

The WSREP_STATUS plugin creates the table in the database. The plugin also adds the statement.

These tables and statements provide information about . Only users with the privilege can access this information.

Installing the Plugin

iAlthough the plugin's shared library is distributed with MariaDB by default, 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 or :

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 or the options. This can be specified as a command-line argument to or it can be specified in a relevant server in an :

Uninstalling the Plugin

You can uninstall the plugin dynamically by executing or :

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.

Example

Options

wsrep_membership

  • Description: Controls how the server treats the plugin when the server starts up.

    • Valid values are:

      • OFF - Disables the plugin without removing it from the table.

wsrep_status

  • Description: Controls how the server treats 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

wsrep_provider

The wsrep_provider plugin exposes Galera Cluster provider options as individual system variables, allowing for easier configuration and validation of cluster settings.

This plugin is for . It splits up the wsrep_provider_options setting into individual configuration variables.

The plugin is available from MariaDB 11.4, and built in to the server, but not enabled by default.

Without that plugin, options are grouped together, like this:

With this plugin loaded, you can configure individual variables, like this:

This makes managing provider options easier, and helps avoid the problem of wsrep_provider_options exceeding the maximum length of 2048 characters for an individual variable.

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: --wsrep-membership=value

  • Data Type: enumerated

  • Default Value: ON

  • Valid Values: OFF, ON, FORCE, FORCE_PLUS_PERMANENT

  • 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: --wsrep-status=value

  • Data Type: enumerated

  • Default Value: ON

  • Valid Values: OFF, ON, FORCE, FORCE_PLUS_PERMANENT

  • INFORMATION_SCHEMA
    SHOW WSREP_MEMBERSHIP
    WSREP_STATUS
    INFORMATION_SCHEMA
    SHOW WSREP_STATUS
    SUPER
    INSTALL SONAME
    INSTALL PLUGIN
    --plugin-load
    --plugin-load-add
    mysqld
    option group
    option file
    UNINSTALL SONAME
    UNINSTALL PLUGIN
    --plugin-load
    --plugin-load-add
    option group
    option file
    mysql.plugins
    mysql.plugins
    Galera
    To enable the plugin, add the following line to the [mariadbd], [server], or [galera] sections of your server option file:

    Alternatively, start the server with the --plugin-wsrep-provider option.

    See the page for what you can configure for Galera Cluster.

    For plugin version and maturity level, see this page.

    wsrep_provider_options="base_dir = /var/lib/mysql/; base_host = node-1;..."
    wsrep_provider_base_dir  = /var/lib/mysql/
    wsrep_provider_base_host = node-1
    ...
    Galera Cluster
    plugin-wsrep-provider=ON
    INSTALL SONAME 'wsrep_info';
    [mariadb]
    ...
    plugin_load_add = wsrep_info
    UNINSTALL SONAME 'wsrep_info';
    SHOW TABLES FROM information_schema LIKE 'WSREP%';
    +---------------------------------------+
    | Tables_in_information_schema (WSREP%) |
    +---------------------------------------+
    | WSREP_STATUS                          |
    | WSREP_MEMBERSHIP                      |
    +---------------------------------------+
    wsrep_provider_options