Step 1: Install Enterprise Spider
This page is part of MariaDB's Documentation.
The parent of this page is: Deploy Spider Sharded Topology with MariaDB Enterprise Server 10.5
Topics on this page:
Overview
This page details step 1 of the 3-step procedure "Deploy Spider Sharded Topology".
This step installs the Enterprise Spider storage engine plugin on the Spider Node.
Interactive commands are detailed. Alternatively, the described operations can be performed using automation.
Allow Interconnect
MariaDB Enterprise Spider depends on interconnect between the Spider Node and all Data Nodes. This may require adjustment to firewall and security settings.
Install Spider Package
The Enterprise Spider storage engine plugin is not installed with MariaDB Enterprise Server 10.5 by default. An additional package must be installed.
Install via YUM (CentOS, RHEL)
On the Spider Node, install MariaDB Enterprise Spider:
$ sudo yum install MariaDB-spider-engine
Install via APT (Debian, Ubuntu)
On the Spider Node, install MariaDB Enterprise Spider:
$ sudo apt install mariadb-plugin-spider
Install via ZYpp (SLES)
On the Spider Node, install MariaDB Enterprise Spider:
$ sudo zypper install MariaDB-spider-engine
Load the Spider Plugin
The Enterprise Spider storage engine plugin must be loaded by MariaDB Enterprise Server 10.5.
On the Spider Node, use one of the following methods to configure MariaDB Enterprise Server 10.5 to load the Enterprise Spider storage engine plugin:
Interface | Method | Benefits |
---|---|---|
Shell |
| |
SQL |
|
Load Spider with Configuration File
On the Spider Node, set the plugin_ha_spider
in a configuration file. The plugin_
Choose a configuration file for custom changes to system variables and options.
It is not recommended to make custom changes to Enterprise Server's default configuration files, because your custom changes can be overwritten by other default configuration files that are loaded after.
Ensure that your custom changes will be read last by creating a custom configuration file in one of the included directories. Configuration files in included directories are read in alphabetical order. Ensure that your custom configuration file is read last by using the
z-
prefix in the file name.Some example configuration file paths for different distributions are shown in the following table:
Distributions
Example configuration file path
CentOSRHELRocky LinuxSLES/etc/my.cnf.d/z-custom-mariadb.cnf
DebianUbuntu/etc/mysql/mariadb.conf.d/z-custom-mariadb.cnf
Set the plugin_
load_ option in the configuration file.add It must be set in a group that will be read by MariaDB Server, such as
[mariadb]
or[server]
.For example:
[mariadb] ... plugin_load_add = "ha_spider"
Restart MariaDB Enterprise Server:
$ sudo systemctl restart mariadb
Load Spider with INSTALL SONAME
On the Spider Node, execute the INSTALL SONAME statement with the library name ha_spider
. The INSTALL SONAME statement configures MariaDB Enterprise Server 10.5 to load the Enterprise Spider storage engine plugin. The INSTALL SONAME statement requires the SUPER privilege.
The INSTALL SONAME statement adds the Enterprise Spider storage engine to the mysql.plugin system table. When the Spider Node is restarted, MariaDB Enterprise Server reads the system table and reloads the plugin, so the statement only needs to be executed once.
Connect to the Spider Node using MariaDB Client:
$ sudo mariadb
Use the INSTALL SONAME statement to install the Enterprise Spider storage engine plugin:
INSTALL SONAME "ha_spider";
Test Plugin Installation
On the Spider Node, confirm that the Enterprise Spider storage engine plugin is loaded by querying the information_
SELECT PLUGIN_NAME, PLUGIN_STATUS
FROM information_schema.PLUGINS
WHERE PLUGIN_LIBRARY LIKE "ha_spider%";
+--------------------------+---------------+
| PLUGIN_NAME | PLUGIN_STATUS |
+--------------------------+---------------+
| SPIDER | ACTIVE |
| SPIDER_ALLOC_MEM | ACTIVE |
| SPIDER_WRAPPER_PROTOCOLS | ACTIVE |
+--------------------------+---------------+
When the Enterprise Spider storage engine is loaded, the PLUGIN_NAME
column contains the value SPIDER
and the PLUGIN_STATUS
column contains the value ACTIVE
.