Galera Cluster System Tables
Reference for the wsrep system tables in the mysql database, including wsrep_cluster, wsrep_cluster_members, wsrep_streaming_log, and the writable wsrep_allowlist for joiner IP control.
With Galera 4, several system tables related to replication are available in the mysql database. These tables can be queried by administrators to get a real-time view of the cluster's layout, membership, and current operations.
You can view these tables with the following query:
SHOW TABLES FROM mysql LIKE 'wsrep%';+---------------------------+
| Tables_in_mysql (wsrep%) |
+---------------------------+
| wsrep_allowlist |
| wsrep_cluster |
| wsrep_cluster_members |
| wsrep_streaming_log |
+---------------------------+These tables are managed by the cluster itself and should not be modified by users, with the exception of wsrep_allowlist.
wsrep_allowlist
This table stores a list of allowed IP addresses that can join the cluster and perform a state transfer (IST/SST). It is a security feature to prevent unauthorized nodes from joining.
MariaDB [mysql]> DESCRIBE wsrep_allowlist;To add a new node to the allowlist, you can INSERT its IP address:
If a node attempts to join and its IP address is not in the allowlist, the join will fail. The DONOR nodes will log a warning similar to this:
The joining node will fail with a connection timeout error.
wsrep_cluster
This table contains a single row with a high-level view of the cluster's identity, state, and capabilities.
cluster_uuid
The unique identifier for the cluster.
view_id
Corresponds to the wsrep_cluster_conf_id status variable, representing the current membership view ID.
view_seqno
The global transaction sequence number associated with this cluster view.
protocol_version
The wsrep protocol version in use.
capabilities
A bitmask of capabilities provided by the Galera library.
You can query its contents like this:
wsrep_cluster_members
This table provides a real-time list of all the nodes that are currently members of the cluster component.
node_uuid
The unique identifier for each individual node.
cluster_uuid
The UUID of the cluster this node belongs to.
node_name
The human-readable name of the node, set by the wsrep_node_name parameter.
node_incoming_address
The IP address and port where the node is listening for client connections.
Querying this table gives you a quick overview of the current cluster membership:
wsrep_streaming_log
This table contains metadata for Streaming Replication transactions that are currently in progress. Each row represents a write-set fragment. The table is typically empty unless a large or long-running transaction with streaming enabled is active.
node_uuid
The UUID of the node where the streaming transaction originated.
trx_id
The transaction identifier.
seqno
The sequence number of the specific write-set fragment.
flags
Flags associated with the fragment.
frag
The binary log events contained in the fragment.
Example of querying the table during a streaming transaction:
This page is licensed: CC BY-SA / Gnu FDL
Last updated
Was this helpful?

