Managing MySQL® cluster aliases
You can assign each MySQL® cluster an alias, which is a custom network name. An alias is mapped to a specific DNS record which always points to the master host of the cluster associated with the alias. This allows you to access the cluster using a human-readable name, regardless of internal host FQDNs. The alias must be unique within the folder. You can assign only one alias per cluster.
To switch your apps to another cluster in the same folder, all you need to do is change the cluster-alias association.
Alias format:
c-<alias_name>-my-<folder_ID>.rw.mdb.yandexcloud.net
Note
When creating an alias, you only specify its name.
Getting the cluster alias
Viewing the alias requires the managed-mysql.viewer role or higher for the folder.
-
Navigate
to Managed Service for MySQL. -
Click the cluster name.
The cluster alias is displayed in the CNAME alias field.
Creating a cluster alias
Creating an alias requires the managed-mysql.editor role or higher for the folder.
Warning
Due to DNS propagation, it may take some time for the alias to become available after the operation completes.
- Navigate
to Managed Service for MySQL. - Click the cluster name and click
in the CNAME alias section. - In the window that opens, specify a name for the cluster alias. Use only lowercase Latin letters, numbers, and hyphens. The alias may be up to 63 characters long.
- Click Create alias.
Moving an alias between clusters
You can move an alias only between clusters in the same folder. Moving an alias requires the managed-mysql.editor role or higher for the folder.
Warning
Due to DNS propagation, it may take some time for the alias to become available after the operation completes.
-
Navigate
to Managed Service for MySQL. -
You can move the alias in one of these two ways:
-
In the settings of the cluster with the alias:
- Click the name of the cluster whose alias you want to move to another cluster in your folder, and then
in the CNAME alias section. - In the window that opens, select the cluster to associate the alias with.
- Click the name of the cluster whose alias you want to move to another cluster in your folder, and then
-
In the settings of the cluster to move the alias to.
- Click the name of the cluster to which you want to move the alias of another cluster in your folder, and then
in the CNAME alias section. - In the window that opens, select the cluster the alias is associated with.
- Click the name of the cluster to which you want to move the alias of another cluster in your folder, and then
-
-
Confirm moving the cluster and click Move alias.
Deleting an alias
Deleting an alias requires the managed-mysql.editor role or higher for the folder.
- Navigate
to Managed Service for MySQL. - Click the cluster name and then,
in the CNAME alias section. - In the window that opens, confirm the alias deletion.