

# Connect and check your member clusters

In this step, you connect to each member cluster of your database cluster group for Aurora directly and check it. Each member cluster keeps its own cluster and instance endpoints, and a connection to them carries the full SQL of a standalone Aurora DB cluster, with cluster names.

## Connecting to a member cluster
<a name="databaseclustergroups-gs-connect-direct"></a>

A direct connection to a member cluster follows that cluster's own TLS settings, as for any Aurora DB cluster. For those settings, see [TLS connections to Aurora MySQL DB clusters](AuroraMySQL.Security.md#AuroraMySQL.Security.SSL). The examples on this page connect with TLS.

**To connect to a member cluster directly**

1. In the Amazon RDS console or with the AWS CLI, find the member cluster's cluster endpoint, as described in [Amazon Aurora endpoint connections](Aurora.Overview.Endpoints.md).

1. From your SQL host, connect to the member cluster's cluster endpoint. Use a database user that you keep for direct connections. The command follows this procedure.

The following command connects with the MySQL client, with TLS required.

```bash
mysql -h {{MEMBER_CLUSTER_ENDPOINT}} -u {{USER}} -p --ssl-mode=REQUIRED
```

For general Aurora connection steps, see [Connecting to an Amazon Aurora DB cluster](Aurora.Connecting.md).

## Checking your member clusters
<a name="databaseclustergroups-gs-connect-checks"></a>

Over a direct connection, check the settings that your application depends on. Through the routing endpoint, the routing layer sets `sql_mode`, `time_zone`, `autocommit`, `transaction_isolation`, `auto_increment_increment`, character set, and the session timeouts `wait_timeout`, `interactive_timeout`, and `net_write_timeout` on every member session. Member cluster parameter group values for these settings don't apply to routed sessions. The default `sql_mode` is empty, so routed writes aren't strict: an out-of-range number is stored as the column's limit, and an over-long string is cut, each with a warning. To get strict mode, set the `sql_mode` routing endpoint parameter, for example to `STRICT_TRANS_TABLES`. A routed session that doesn't set `time_zone` uses the `time_zone` routing endpoint parameter, `+00:00` by default. Keep other parameters that affect how a statement is interpreted the same on every member cluster. A member cluster returns no error when they differ.

**To check a member cluster**

1. With the AWS CLI, run `describe-db-cluster-groups` and read `MinEngineVersion` and `MaxEngineVersion`. If the two values differ, the member clusters run different engine versions, which a wave upgrade can leave in place. On each version, check the settings that your application depends on.

1. On each member cluster, through a direct connection, read the settings that must match. The query follows this procedure.

1. Compare the results across member clusters. Align any value that differs before you enable routing.

1. On each member cluster, through a direct connection, read the connection limit, and check that it fits your connection pools.

The following query reads the engine version and some of the settings that affect how a statement is interpreted. Run it on each member cluster.

```sql
SELECT @@aurora_version, @@sql_mode, @@time_zone;
```

The following query reads the connection limit.

```sql
SELECT @@max_connections;
```

For what to align before a cluster joins, see [Adding and removing member clusters](databaseclustergroups-member-clusters.md).

## Direct connections and the routing endpoint
<a name="databaseclustergroups-gs-connect-next"></a>

Direct connections to each member cluster keep working alongside the routing endpoint. Both are supported ways to connect. For endpoint names, client settings, and when to connect directly to a member cluster, see [Connecting to the routing endpoint](databaseclustergroups-connecting.md).

**Result:** You can reach each member cluster through its own endpoint, and the settings match on every member cluster.

If you use routing, continue with [Enable routing and add data mappings](databaseclustergroups-gs-routing.md). If you don't use routing, you can continue at [Managing a database cluster group for Aurora](databaseclustergroups-managing.md). To remove the resources that you created for the tutorial, see [Cleaning up resources](databaseclustergroups-gs-clean-up.md).