Managing MySQL cluster hosts
You can add and remove cluster hosts and manage their settings.
Getting a list of cluster hosts
- Go to the folder page
and select Managed Service for MySQL. - Click the cluster name and select the Hosts tab.
If you don't have the Nebius AI command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To get a list of cluster hosts, run the command:
ncp managed-mysql host list \
--cluster-name=<cluster name>
Result:
+-------------------------------+--------------+---------+--------+-------------+
| NAME | CLUSTER ID | ROLE | HEALTH | ZONE ID |
+-------------------------------+--------------+---------+--------+-------------+
| rc1b...mdb.nemax.nebius.cloud | c9q5k4ve7... | MASTER | ALIVE | eu-north1-c |
| rc1a...mdb.nemax.nebius.cloud | c9q5k4ve7... | REPLICA | ALIVE | eu-north1-c |
+-------------------------------+--------------+---------+--------+-------------+
The cluster name can be requested with a list of clusters in the folder.
Adding a host
The number of hosts in Managed Service for MySQL clusters is limited by the CPU and RAM quotas available to DB clusters in your cloud. To check the resources in use, open the quotas page in the management console and find Managed Databases.
-
Go to the folder page
and select Managed Service for MySQL. -
Click the cluster name and go to the Hosts tab.
-
Click Add host.
-
Specify the host parameters:
-
Availability zone.
-
Subnet.
-
Select Public access if the host must be accessible from outside Nebius AI.
-
Priority for assigning the host as a master.
-
Host priority as a MySQL replica for creating backups.
-
If you don't have the Nebius AI command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To add a host to a cluster:
-
Request a list of cluster subnets to select one for the new host:
ncp vpc subnet list
Result:
+-----------+-----------+------------+-------------+------------------+ | ID | NAME | NETWORK ID | ZONE | RANGE | +-----------+-----------+------------+-------------+------------------+ | b0cl69... | default-c | enp6rq7... | eu-north1-c | [172.16.0.0/20] | | e2lkj9... | default-b | enp6rq7... | eu-north1-c | [10.10.0.0/16] | | e9b0ph... | a-2 | enp6rq7... | eu-north1-c | [172.16.32.0/20] | | e9b9v2... | default-a | enp6rq7... | eu-north1-c | [172.16.16.0/20] | +-----------+-----------+------------+-------------+------------------+
-
View a description of the CLI command for adding a host:
ncp managed-mysql host add --help
-
Run the add host command (the example does not show all the available parameters):
ncp managed-mysql host add \ --cluster-name=<cluster name> \ --host zone-id=<availability zone ID>,` `subnet-id=<subnet ID>,` `assign-public-ip=<public access to the subcluster host: true or false>,` `replication-source=<source host name>,` `backup-priority=<host priority for backups: from 0 to 100>,` `priority=<priority for assigning the host as master: from 0 to 100>
Where:
--cluster-name
: Name of Managed Service for MySQL cluster.--host
: Host parameters:zone-id
: Availability zone.subnet-id
: Subnet ID. It must be specified if the selected availability zone includes two or more subnets.assign-public-ip
: Host accessibility from the internet.replication-source
: Replication source for the host.backup-priority
: Host priority for backups.priority
: Priority for selecting the host as a master if the primary master fails.
The cluster name can be requested with a list of clusters in the folder.
Changing a host
For each host in a Managed Service for MySQL cluster, you can:
- Set priority for backups.
- Set a priority for assigning the host as a master if the primary master fails.
Note
You cannot restart a separate cluster host. To restart hosts, stop and restart the cluster.
To change the parameters of the cluster host:
- Go to the folder page
and select Managed Service for MySQL. - Click the cluster name and open the Hosts tab.
- Click the
- Set new settings for the host:
- Set the value of the Master priority field.
- Set the value of the Backup priority field.
- Click Save.
If you don't have the Nebius AI command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To modify host parameters, execute the command below (the parameter list in the example is not exhaustive):
ncp managed-mysql host update <host name> \
--cluster-name=<cluster name> \
--backup-priority=<host priority for backups: from 0 to 100> \
--priority=<priority for assigning the host as a master: from 0 to 100>
Where:
--cluster-name
: Name of Managed Service for MySQL cluster.--backup-priority
: Host priority for backups.--priority
: Priority for selecting the host as a master if the primary master fails.
The host name can be requested with a list of cluster hosts, and the cluster name can be requested with a list of clusters in the folder.
Removing a host
You can remove a host from a MySQL cluster if it is not the only host in it. To replace a single host, first create a new host and then remove the old one.
If the host is the master when deleted, Managed Service for MySQL automatically assigns the next highest-priority replica as the master.
- Go to the folder page
and select Managed Service for MySQL. - Click the cluster name and open the Hosts tab.
- Click the
If you don't have the Nebius AI command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To remove a host from the cluster, run:
ncp managed-mysql host delete <hostname> \
--cluster-name=<cluster name>
The host name can be requested with a list of cluster hosts, and the cluster name can be requested with a list of clusters in the folder.