# wsrep\_cluster\_name

## Overview <a href="#overview_h2" id="overview_h2"></a>

Name for the cluster.

## Details

This system variable specifies the logical name of the cluster. Every Cluster Node that connects to each other **must** have the same logical name in order to form a component or join the Primary Component.

### Parameters

| Command-line          | --wsrep\_cluster\_name=arg |
| --------------------- | -------------------------- |
| Configuration file    | Supported                  |
| Dynamic               | Yes                        |
| Scope                 | Global                     |
| Data Type             | VARCHAR                    |
| Product Default Value | my\_wsrep\_cluster         |

## Examples

### Configuration

Set the cluster name using an options file:

```ini
[mariadb]
wsrep_provider        = /usr/lib/galera/libgalera_smm.so
wsrep_cluster_name    = example_cluster
wsrep_cluster_address = gcomm://192.0.2.1,192.0.2.2,192.0.2.3
```

### Show Configuration

To view the current cluster name, use the [SHOW VARIABLES](/docs/server/reference/sql-statements/administrative-sql-statements/show/show-variables.md) statement:

```sql
SHOW VARIABLES LIKE "wsrep_cluster_name";
```

```
+--------------------+-----------------+
| Variable_name      | Value           |
+--------------------+-----------------+
| wsrep_cluster_name | example_cluster |
+--------------------+-----------------+
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/galera-cluster/reference/wsrep-variable-details/wsrep_cluster_name.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
