Step 3: Test MariaDB Enterprise Server
This page is part of MariaDB's Documentation.
The parent of this page is: Deploy Galera Cluster Topology with Enterprise Server 10.5
Topics on this page:
Overview
This page details step 3 of the 6-step procedure "Deploy Galera Cluster Topology".
This step tests MariaDB Enterprise Server.
Interactive commands are detailed. Alternatively, the described operations can be performed using automation.
Test Enterprise Server Service
Use Systemd to test whether the MariaDB Enterprise Server service is running.
This action is performed on each Enterprise Cluster node.
Check if the MariaDB Enterprise Server service is running by executing the following:
$ systemctl status mariadb
If the service is not running on any node, start the service by executing the following on that node:
$ sudo systemctl start mariadb
Test Local Client Connections
Use MariaDB Client to test the local connection to the Enterprise Server node.
This action is performed on each Enterprise Cluster node:
$ sudo mariadb
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 38
Server version: 10.5.27-21-MariaDB-Enterprise MariaDB Enterprise Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
The sudo
command is used here to connect to the Enterprise Server node using the root@localhost
user account, which authenticates using the unix_
Test Cluster Status
MariaDB Enterprise Cluster is operational when the cluster has a Primary Component. Query the wsrep_
This action is performed on each Enterprise Cluster node.
Check the cluster status by executing the following:
SHOW GLOBAL STATUS LIKE 'wsrep_cluster_status';
+----------------------+---------+
| Variable_name | Value |
+----------------------+---------+
| wsrep_cluster_status | Primary |
+----------------------+---------+
If the Value
column does not contain Primary
on any node, then the node is not part of the Primary Component. Investigate network connectivity between the node and the nodes in the Primary Component.
Test Cluster Size
MariaDB Enterprise Cluster maintains a count of the cluster size. Query the wsrep_
This action is performed on each Enterprise Cluster node.
Check the cluster size by executing the following:
SHOW GLOBAL STATUS LIKE 'wsrep_cluster_size';
+--------------------+---------+
| Variable_name | Value |
+--------------------+---------+
| wsrep_cluster_size | 3 |
+--------------------+---------+
If the Value
column does not contain the expected number of nodes, then some nodes might not be in the cluster. Check the value of the wsrep_
Test DDL
Use MariaDB Client to test DDL.
On a single Enterprise Cluster node, use the MariaDB Client to connect to the node:
$ sudo mariadb
Create a test database and InnoDB table:
CREATE DATABASE IF NOT EXISTS test; CREATE TABLE test.contacts ( id INT PRIMARY KEY AUTO_INCREMENT, first_name VARCHAR(50), last_name VARCHAR(50), email VARCHAR(100) );
On each other Enterprise Cluster node, use the MariaDB Client to connect to the node:
$ sudo mariadb
Confirm that the database and table exist:
SHOW CREATE TABLE test.contacts\G;
If the database or table do not exist on any node, then check that:
The nodes are in the Primary Component of the same cluster.
The wsrep_
osu_ system variable is not set tomethod RSU
.
Test DML
Use MariaDB Client to test DML.
On a single Enterprise Cluster node, use the MariaDB Client to connect to the node:
$ sudo mariadb
Insert sample data into the table created in the DDL test:
INSERT INTO test.contacts (first_name, last_name, email) VALUES ("Kai", "Devi", "kai.devi@example.com"), ("Lee", "Wang", "lee.wang@example.com");
On each other Enterprise Cluster node, use the MariaDB Client to connect to the node:
$ sudo mariadb
Execute a SELECT query to retrieve the data:
SELECT * FROM test.contacts;
+----+------------+-----------+----------------------+ | id | first_name | last_name | email | +----+------------+-----------+----------------------+ | 1 | Kai | Devi | kai.devi@example.com | | 2 | Lee | Wang | lee.wang@example.com | +----+------------+-----------+----------------------+
If the data is not returned on any node, then check that:
The nodes are in the Primary Component of the same cluster.
The table uses the InnoDB storage engine.
The wsrep_
on system variable is set toON
.