Changing MySQL cluster settings
After creating a cluster, you can:
-
Warning
You cannot change MySQL settings using SQL commands.
-
Move a cluster to another folder.
Changing the host class
The choice of a host class 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.
Note
Some MySQL settings depend on the selected host class.
- Go to the folder page
and select Managed Service for MySQL. - Select the cluster and click Edit cluster in the top panel.
- To change the class of MySQL hosts, under Host class, select the required class.
- Click Save changes.
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 change the host class for the cluster:
-
View a description of the update cluster CLI command:
ncp managed-mysql cluster update --help
-
Request a list of available host classes (the
ZONES
column specifies the availability zones where you can select the appropriate class):ncp managed-mysql resource-preset list
Result:
+----------+-------------+-------+----------+ | ID | ZONE IDS | CORES | MEMORY | +----------+-------------+-------+----------+ | s3-c2-m8 | eu-north1-c | 2 | 8.0 GB | | ... | +----------+-------------+-------+----------+
-
Specify the class in the update cluster command:
ncp managed-mysql cluster update <cluster name> --resource-preset <class ID>
Managed Service for MySQL will run the update host class command for the cluster.
Increasing storage size
Make sure the cloud has enough quota to increase the storage size. Open the cloud's quotas page in the management console and make sure there is space available under Managed Databases in the SSD storage capacity line.
To increase the cluster storage size:
- Go to the folder page
and select Managed Service for MySQL. - Select the cluster and click Edit cluster in the top panel.
- Under Size of storage, specify the required value.
- Click Save changes.
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 increase the cluster storage size:
-
View a description of the update cluster CLI command:
ncp managed-mysql cluster update --help
-
Specify the required storage in the cluster update command (it must be at least as large as
disk_size
in the cluster properties):ncp managed-mysql cluster update <cluster name or ID> \ --disk-size <storage size in GB>
Changing MySQL settings
Note
Some MySQL settings depend on the selected host class.
- Go to the folder page
and select Managed Service for MySQL. - Select the cluster and click Edit cluster in the top panel.
- Configure the MySQL settings by clicking Settings under DBMS settings.
- Click Save.
- Click Save changes.
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 update the MySQL settings:
-
View a description of the update cluster configuration CLI command:
ncp managed-mysql cluster update-config --help
-
Set the required parameter values.
Use
snake_case
in the parameter name. For example,log_min_duration_statement
:ncp managed-mysql cluster update-config <cluster name> --set log_min_duration_statement=100,<parameter name>=<value>,...
Managed Service for MySQL runs the update cluster settings operation.
Changing additional cluster settings
-
Go to the folder page
and select Managed Service for MySQL. -
Select the cluster and click Edit cluster in the top panel.
-
Change additional cluster settings:
-
Backup start time (UTC)
The time in UTC (in 24-hour format) to start backing up the cluster. If the time is not set, the backup will start at 22:00 UTC.
-
Deletion protection: Manages cluster protection from accidental deletion by a user.
Cluster deletion protection will not prevent a manual connection to delete the contents of a database.
-
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 change additional cluster settings:
-
View a description of the update cluster CLI command:
ncp managed-mysql cluster update --help
-
Run the following command with a list of settings to update:
ncp managed-mysql cluster update <cluster name> \ --backup-window-start <backup start time> \ --deletion-protection=<cluster deletion protection: true or false>
You can change the following settings:
--backup-window-start
: The cluster backup start time, set in UTC formatHH:MM:SS
. If the time is not set, the backup will start at 22:00 UTC.
-
--deletion-protection
: Cluster protection from accidental deletion by a user.Cluster deletion protection will not prevent a manual connection to delete the contents of a database.
You can retrieve the cluster name with a list of clusters in the folder.
Moving a cluster
- Go to the folder page and select Managed Service for MySQL.
- Click the
- Select Move.
- Select a folder you want to move the cluster to.
- Click Move.
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 move a cluster:
-
View a description of the CLI move cluster command:
ncp managed-mysql cluster move --help
-
Specify the destination folder in the move cluster command:
ncp managed-mysql cluster move <cluster ID> \ --destination-folder-name=<destination folder name>
You can get the cluster ID with a list of clusters in the folder.