[Yandex Cloud documentation](../../../index.md) > [Yandex Managed Service for MySQL®](../../index.md) > [Step-by-step guides](../index.md) > [Connection](index.md) > FQDNs of hosts

# FQDNs of MySQL® hosts

To connect to a host, you need its [FQDN](../../concepts/network.md#hostname) (fully qualified domain name). You can use the [FQDN of a particular host](#get-fqdn) in the cluster or a special FQDN always pointing to the [current master host](#fqdn-master) or the [most recent replica](#fqdn-replica).

Here is a host FQDN example:

```text
rc1a-goh2a9tr********.mdb.yandexcloud.net
```

## Getting a host FQDN {#get-fqdn}

There are several ways to get a MySQL® host's FQDN:

* Look up the FQDN in the management console:

    1. Navigate to the cluster page.
    1. Navigate to **Hosts**.
    1. Copy the **Host FQDN** column value.

* In the [management console](https://console.yandex.cloud), copy the cluster connection command (it contains the host’s FQDN). To get this command, navigate to the cluster page and click **Connect**.

* [Get the list of cluster hosts](../hosts.md#list) using the CLI or API.

## Special FQDNs {#special-fqdns}

Alongside regular FQDNs, Managed Service for MySQL® offers special FQDNs that can also be used for cluster connections.

In multiple-host clusters, special FQDNs may for some time (up to 10 minutes) point to the old host, even if it has changed its role (e.g., from a master to a replica). If using a special FQDN which points to the current master, some write requests may fail if routed to the replica. This is because it takes time to update DNS records for special FQDNs. If your write request returns an error, repeat it later.

{% note warning %}

If [automatic failover](../../concepts/replication.md#master-failover) promotes a host without public access to master or most recent replica, you will not be able to connect to that host from the internet. To avoid this, [enable public access](../hosts.md#update) for all cluster hosts.

{% endnote %}

### Current master {#fqdn-master}

An FQDN in `c-<cluster_ID>.rw.mdb.yandexcloud.net` format always points to the current master host in the cluster. You can get the cluster ID with the [list of clusters in the folder](../cluster-list.md#list-clusters).

When connecting to this FQDN, you can perform read and write operations.

{% note warning %}

Use master host special FQDN-based connections only for processes that can cope with database being unavailable for writing for up to 10 minutes.

{% endnote %}

### Most recent replica {#fqdn-replica}

An FQDN in `c-<cluster_ID>.ro.mdb.yandexcloud.net` format points to the [replica](../../concepts/replication.md) that is most up-to-date with the current master. You can get the cluster ID from the [list of clusters in your folder](../cluster-list.md#list-clusters).

**Specifics:**

* When connecting to this FQDN, you can only perform read operations.
* If there are no active replicas in the cluster, you cannot connect to this FQDN as the respective DNS CNAME record will point to a `null` object.