Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex Managed Service for MySQL®
  • Getting started
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes
    • General questions
    • Questions about MySQL
    • Connection
    • Cluster read/write issues
    • Performance issues
    • Updating a cluster
    • Monitoring and logs
    • Migration/transfer
    • Configuring MySQL
    • All questions on one page

In this article:

  • General questions
  • Questions about MySQL®
  • Connection
  • Cluster read/write issues
  • Performance issues
  • Updating a cluster
  • Monitoring and logs
  • Migration/transfer
  • Configuring MySQL®
  1. FAQ
  2. All questions on one page

FAQ about Managed Service for MySQL®

Written by
Yandex Cloud
Updated at December 10, 2025
  • General questions
  • Questions about MySQL®
  • Connection
  • Cluster read/write issues
  • Performance issues
  • Updating a cluster
  • Monitoring and logs
  • Migration/transfer
  • Configuring MySQL®

General questionsGeneral questions

  • What is Managed Service for MySQL®?

  • What is the role of Managed Service for MySQL® in database management and maintenance?

  • When should I use Managed Service for MySQL®, and when should I use VMs running databases?

  • What is a database host and database cluster?

  • How do I get started with Managed Service for MySQL®?

  • How many database hosts can be in a cluster?

  • How can I access a running database host?

  • How many clusters can I create within a single cloud?

  • How are database clusters maintained?

  • Which MySQL® version does Managed Service for MySQL® use?

  • What happens when a new DBMS version is released?

  • What happens when a DBMS version becomes deprecated?

  • How do you calculate usage cost for a database host?

  • How can I change the computing resources and storage size for a database cluster?

  • Are database host backups enabled by default?

  • When does a backup run? Is a database cluster available during backups?

  • Can I change the retention period for automatic backups?

  • What metrics and processes can be monitored?

  • How do I get the logs of my activity in the Yandex Cloud services?

Questions about MySQL®Questions about MySQL®

  • Which MySQL® versions does Managed Service for MySQL® support?

  • Is database cluster backup enabled by default?

  • Is encryption enabled for MySQL® database cluster connections?

  • What is a read-only replica in MySQL®?

  • What restrictions are placed on MySQL® database clusters?

  • Why is my cluster slow even though the computing resources are not fully utilized?

ConnectionConnection

  • How do I connect to a cluster?

  • Why cannot I connect from the internet?

  • Why cannot I connect from Yandex Cloud?

  • Why cannot I connect to a multi-host cluster?

  • Can I connect to cluster hosts over SSH or get superuser privileges on hosts?

  • What should I do if I get a revocation check error when using PowerShell to obtain an SSL certificate?

  • Why would the connection limit be exceeded?

Cluster read/write issuesCluster read/write issues

  • Why do cluster writes fail?

  • What causes a replica to lag?

  • Why is the cluster size a lot larger than the amount of data it stores?

  • What should I do in case of an application error?

Performance issuesPerformance issues

  • How do I find out what is causing performance degradation at peak loads?

  • How do I find out what is causing overall performance degradation?

  • How do I find out why resources take long to load?

  • How do I find out what is causing high CPU usage?

  • How do I find out what is causing high I/O usage?

  • How do I find out what is causing high network usage?

  • How do I find out the causes of locks?

  • How do I optimize queries with performance issues?

Updating a clusterUpdating a cluster

  • Can I manage a cluster using SQL commands?

  • How do I reduce the size of a disk?

  • How do I increase the size of a disk?

  • How do I change the disk type?

  • Why cannot I add or delete a host?

  • How do I perform a manual failover?

  • How do I restart a host?

Monitoring and logsMonitoring and logs

  • How do I view cluster and host charts?

  • How do I view logs?

  • How do I view current queries?

  • What other diagnostic information is available?

  • How do I set up alerts?

  • How do I set up an alert that triggers as soon as a certain percentage of disk space has been used up?

Migration/transferMigration/transfer

  • How do I transfer data to a cluster?

  • How do I move a cluster to a different folder or cloud?

  • External replication error

Configuring MySQL®Configuring MySQL®

  • How do I set a time zone?

  • How do I set SQL mode?

  • What value should I set for innodb_buffer_pool_size?

  • How do I disable InnoDB strict mode?

  • How do I change character sets and collation rules?

  • How do I configure other settings?

General questionsGeneral questions

What is Managed Service for MySQL®?What is Managed Service for MySQL®?

Managed Service for MySQL® is a solution that helps you create, operate, and scale MySQL® databases in the cloud.

With Managed Service for MySQL®, you can:

  • Create databases with performance settings tailored to your needs.
  • Scale your database compute and dedicated storage capacity as needed.
  • Get database logs.

Managed Service for MySQL® takes over time-consuming MySQL® infrastructure administration tasks:

  • Provides monitoring of your resource consumption.
  • Automatically backs up your databases.
  • Ensures fault tolerance through automatic failover to standby replicas.
  • Keeps your DBMS software updated.

You work with a Managed Service for MySQL® database cluster just like with your local database. This allows you to fine-tune your database’s internal settings to meet your application’s specific requirements.

What is the role of Managed Service for MySQL® in database management and maintenance?What is the role of Managed Service for MySQL® in database management and maintenance?

When you create clusters, Managed Service for MySQL® allocates resources, installs the DBMS, and creates databases.

For all created and running databases, Managed Service for MySQL® automatically creates backups and applies fixes and updates.

Furthermore, Managed Service for MySQL® ensures data replication between database hosts, both within and across availability zones, with automatic failover to a standby replica if a failure occurs.

Be mindful of what is what is controlled by the service, and what by the Yandex Cloud customer. Understanding these control zones will help you use your cloud resources effectively and avoid potential database-related problems. For more information, see Zones of control between managed database (MDB) service users and Yandex Cloud.

When should I use Managed Service for MySQL®, and when should I use VMs running databases?When should I use Managed Service for MySQL®, and when should I use VMs running databases?

Yandex Cloud offers two ways to work with databases:

  • With Managed Service for MySQL®, you can use template databases, with no administrative effort required.
  • Alternatively, with Yandex Compute Cloud virtual machines, you can create and customize your own databases. This approach enables you to use any database management system, access databases over SSH, and more.

What is a database host and database cluster?What is a database host and database cluster?

A database host is a cloud-based isolated database environment with dedicated computing resources and reserved storage capacity.

A database cluster consists of one or more database hosts with configurable replication between them.

How do I get started with Managed Service for MySQL®?How do I get started with Managed Service for MySQL®?

Managed Service for MySQL® is available to all registered Yandex Cloud users.

Before creating a database cluster in Managed Service for MySQL®, you need to decide on its configuration:

  • Host class that will determine your computing power, such as vCPUs, RAM, and more.
  • Storage size (fully reserved when creating the cluster).
  • Network for your cluster.
  • Number of hosts in your cluster and availability zone for each host.

For more information, see Getting started.

How many database hosts can be in a cluster?How many database hosts can be in a cluster?

The minimum number of hosts depends on the selected storage type:

  • A minimum of three hosts is required for the following disk types:

    • Local SSDs (local-ssd)
    • Non-replicated SSDs (network-ssd-nonreplicated)
  • A minimum of one host is required for the following disk types:

    • Network HDDs (network-hdd)
    • Network SSDs (network-ssd)
    • Ultra high-speed network SSDs with three replicas (network-ssd-io-m3)

The maximum number of hosts per cluster cannot exceed the set limits.

For more information, see Quotas and limits.

How can I access a running database host?How can I access a running database host?

You can connect to Managed Service for MySQL® databases using standard DBMS connection methods.

Learn more about connecting to clusters in this guide.

How many clusters can I create within a single cloud?How many clusters can I create within a single cloud?

To learn about MDB quotas and limits, see this article.

How are database clusters maintained?How are database clusters maintained?

In Managed Service for MySQL®, maintenance implies:

  • Automatic installation of DBMS updates and fixes for database hosts (including for stopped clusters).
  • Changes in the host class and storage size.
  • Other Managed Service for MySQL® maintenance activities.

For more information, see Maintenance.

Which MySQL® version does Managed Service for MySQL® use?Which MySQL® version does Managed Service for MySQL® use?

Managed Service for MySQL® supports MySQL® 5.7 and MySQL® 8.

What happens when a new DBMS version is released?What happens when a new DBMS version is released?

The database software is updated with each new minor release. In advance of the scheduled updates, we notify the owners of the affected database clusters about the maintenance window and any expected downtimes.

What happens when a DBMS version becomes deprecated?What happens when a DBMS version becomes deprecated?

One month after a DBMS version becomes deprecated, Managed Service for MySQL® automatically sends email notifications to the owners of database clusters created with that version.

New hosts can no longer be created using deprecated DBMS versions. Database clusters are automatically upgraded to the next supported version seven days after notification for minor releases and one month after notification for major ones. Deprecated major versions will be upgraded even if you disabled automatic updates.

How do you calculate usage cost for a database host?How do you calculate usage cost for a database host?

In Managed Service for MySQL®, the usage cost is calculated based on the following:

  • Selected host class.
  • Reserved storage capacity for the database host.
  • Size of the database cluster backups. You are not charged for storing backups up to your storage size. Additional backup storage is charged according to our pricing policy.
  • Database host uptime in hours. Partial hours are rounded up to the nearest whole hour. For the cost per hour of operation for each host class, see our pricing policy.

How can I change the computing resources and storage size for a database cluster?How can I change the computing resources and storage size for a database cluster?

You can scale your computing resources and storage size directly in the management console by selecting a different host class for your cluster.

The cluster settings will update within 30 minutes. This period may also include other cluster maintenance activities, such as installing updates.

Are database host backups enabled by default?Are database host backups enabled by default?

Yes, backups are enabled by default. The MySQL® backup policies provide full daily backups and continuous transaction log archiving. This enables you to restore your cluster to any point in time within the backup retention period, except for the last 30 seconds.

By default, backups are retained for seven days.

When does a backup run? Is a database cluster available during backups?When does a backup run? Is a database cluster available during backups?

The backup window, the scheduled time for the database cluster’s full daily backup, is from 01:00 to 05:00 (UTC+3).

Clusters remain fully available during the backup window.

Can I change the retention period for automatic backups?Can I change the retention period for automatic backups?

You can set the retention period for automatic backups when creating or updating the cluster.

What metrics and processes can be monitored?What metrics and processes can be monitored?

For all DBMS types, you can monitor:

  • Absolute CPU, memory, network, and disk utilization.
  • Memory, network, and disk usage as a percentage of the set limits for the relevant cluster host class.
  • Amount of data in a database cluster and the remaining free space in your data storage.

For all database hosts, you can monitor metrics specific to their DBMS type. For example, for MySQL®, you can monitor:

  • Average query execution time.
  • Number of queries per second.
  • Number of errors in logs, and more.

You can monitor metrics with a minimum granularity of five seconds.

Does the service meet the requirements of the Russian Federation Federal Law 152-FZ on personal data?Does the service meet the requirements of the Russian Federation Federal Law 152-FZ on personal data?

Yes, it does. You can read the full security audit conclusion here.

Can I get logs of my operations in Yandex Cloud?Can I get logs of my operations in Yandex Cloud?

Yes, you can request information about operations with your resources from Yandex Cloud logs. Do it by contacting support.

Questions about MySQL®Questions about MySQL®

Which MySQL® versions does Managed Service for MySQL® support?Which MySQL® versions does Managed Service for MySQL® support?

Managed Service for MySQL® supports MySQL® 5.7 and MySQL® 8.

Is database cluster backup enabled by default?Is database cluster backup enabled by default?

Yes, backups are enabled by default. The MySQL® cluster backup policies provide full daily backups and continuous transaction log archiving. This enables you to restore your cluster to any point in time within the backup retention period, except for the last 30 seconds.

Is encryption enabled for MySQL® database cluster connections?Is encryption enabled for MySQL® database cluster connections?

Connections between your database cluster and application are always encrypted with SSL. You cannot disable encryption for cluster connections.

What is a read-only replica in MySQL®?What is a read-only replica in MySQL®?

A read-only replica is a MySQL® database cluster host available only for reads that synchronizes its data with the master host. This applies only to clusters with more than one host. You can use a read-only replica to reduce the load on the master host experiencing high read traffic to its database.

What restrictions are placed on MySQL® database clusters?What restrictions are placed on MySQL® database clusters?

For details, see Quotas and limits for Managed Service for MySQL®. To learn about the properties of the clusters you can create with Managed Service for MySQL®, see Host classes.

Why is my cluster slow even though the computing resources are not fully utilized?Why is my cluster slow even though the computing resources are not fully utilized?

Your storage may have insufficient maximum IOPS and bandwidth to process the current number of requests. In this case, throttling occurs, which degrades the entire cluster performance.

The maximum IOPS and bandwidth values increase by a fixed value when the storage size increases by a certain step. The step and increment values depend on the disk type:

Disk type Step, GB Max IOPS increase (read/write) Max bandwidth increase (read/write), MB/s
network-hdd 256 300/300 30/30
network-ssd 32 1,000/1,000 15/15
network-ssd-nonreplicated, network-ssd-io-m3 93 28,000/5,600 110/82

To increase the maximum IOPS and bandwidth values and make throttling less likely, increase the storage size when updating your cluster.

If you are using the network-hdd storage, consider switching to network-ssd or network-ssd-nonreplicated by restoring the cluster from a backup.

ConnectionConnection

How do I connect to a cluster?How do I connect to a cluster?

View the connection examples in this guide or on the cluster page in the management console (click Connect in the top panel).

MySQL® hosts with public access only support connections with an SSL certificate.

There are also special FQDNs pointing to the current master and most recent replica of the cluster.

Why cannot I connect from the internet?Why cannot I connect from the internet?

Check whether your host is publicly accessible. To do this, in the management console:

  1. Navigate to the folder dashboard and select Managed Service for MySQL.
  2. Click the name of your cluster and open the Hosts tab.
  3. Check the Public access column value for your host.

MySQL® hosts with public access only support connections with an SSL certificate.

Additionally, consider the following:

  • If public access in your cluster is only enabled for certain hosts, automatic master failover can make the master unreachable from the internet.
  • If you are using special FQDNs, check the host list to make sure the current master or replica have public access.
  • If you are using Security groups, check their settings.

Why cannot I connect from Yandex Cloud?Why cannot I connect from Yandex Cloud?

Make sure the Yandex Cloud VM you are connecting from is in the same virtual network as the MySQL® cluster.

To do this, in the management console:

  1. Navigate to the folder dashboard, select Managed Service for MySQL, and click the name of your cluster.
  2. Check the Cloud network value and click the network’s name to see its subnets.
  3. Make sure your VM is in one of the network’s subnets.

Additionally, consider the following:

  • If you are connecting to a publicly accessible host, make sure to use an SSL certificate.
  • If you are using special FQDNs, check the host list to make sure the current master or replica have public access.
  • If you are using Security groups, check their settings.

Why cannot I connect to a multi-host cluster?Why cannot I connect to a multi-host cluster?

If public access in your cluster is only enabled for certain hosts, automatic master failover can make the master unreachable from the internet.

Check whether your host is publicly accessible. To do this, in the management console:

  1. Navigate to the folder dashboard and select Managed Service for MySQL.
  2. Click the name of your cluster and open the Hosts tab.
  3. Check the Public access column value for your host.

Additionally, consider the following:

  • If you are using special FQDNs, check the host list to make sure the current master or replica have public access.

  • If you cannot connect to the host you added, check that the cluster security group is properly configured for the subnet containing your host.

Can I connect to cluster hosts over SSH or get superuser privileges on hosts?Can I connect to cluster hosts over SSH or get superuser privileges on hosts?

You cannot connect to hosts via SSH. This is done for the sake of security and user cluster fault tolerance because direct changes inside a host can render it completely inoperable.

What should I do if I get a revocation check error when using PowerShell to obtain an SSL certificate?What should I do if I get a revocation check error when using PowerShell to obtain an SSL certificate?

Here is the full text of the error message:

curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012)
The revocation function was unable to check revocation for the certificate

This means that the service was unable to verify the site’s certificate against the revocation list during the connection attempt.

To fix this error:

  • Make sure your corporate network policies are not blocking the verification.

  • Run the following command with the --ssl-no-revoke flag:

    mkdir $HOME\.mysql; curl.exe --ssl-no-revoke -o $HOME\.mysql\root.crt https://storage.yandexcloud.net/cloud-certs/CA.pem
    

Why would the connection limit be exceeded?Why would the connection limit be exceeded?

The maximum number of concurrent connections to a Managed Service for MySQL® cluster host is defined by the max_connections setting, which defaults to <MB_of_RAM_per_host> ÷ 32 and cannot be lower than 100.

For example, for a s1.micro (2 vCPU, 8 GB) host, the default max_connections value is 8,192 ÷ 32 = 256.

You can change the Max connections value in the cluster settings.

Cluster read/write issuesCluster read/write issues

Why do cluster writes fail?Why do cluster writes fail?

  1. If the database storage reaches 95% capacity, the cluster will switch to read-only mode. Check the amount of free space in your storage and increase the storage size, if required. To check the amount of free space:
    1. Navigate to the folder dashboard and select Managed Service for MySQL.
    2. Click the name of your cluster and open the Monitoring tab.
    3. Check the Disk usage chart.
  2. Make sure all writes target the master host, not a replica.

What causes a replica to lag?What causes a replica to lag?

  1. Check that slave_rows_search_algorithms is set to INDEX_SCAN,HASH_SCAN.
  2. For large tables, we recommend using pt-online-schema-change from the Percona Toolkit rather than ALTER TABLE statements to avoid locking.
  3. If the lag persists, enable parallel replication. To do this, configure the following settings:
    slave_parallel_type=LOGICAL_CLOCK
    slave_parallel_workers=8
    
  4. Run the SHOW SLAVE STATUS; command on the replica. If the Executed_Gtid_Set value remains unchanged for a long time, make sure all the tables have indexes.
  5. For continuous database writes on a host with 8 GB or more of RAM, we recommend increasing innodb_log_file_size up to 1 or 2 GB (changing this setting requires a server restart).

Why is the cluster size a lot larger than the amount of data it stores?Why is the cluster size a lot larger than the amount of data it stores?

This occurs because of MySQL® storage features, not due to Managed Service for MySQL® in Yandex Cloud. The following factors affect the amount of storage used:

  • Fragmentation
  • Index fill factor
  • Rollback segment storage
  • Data type packing

To find out the actual size of database tables, use the INNODB_SYS_TABLESPACES system table. For more information, see Finding MySQL table size on disk.

What should I do in case of an application error?What should I do in case of an application error?

  1. Check whether the disk hosting your cluster has enough free space:
    1. Navigate to the folder dashboard and select Managed Service for MySQL.
    2. Click the name of your cluster and open the Monitoring tab.
    3. Check the Disk usage chart.
  2. Check host monitoring charts:
    1. Navigate to the folder dashboard and select Managed Service for MySQL.
    2. Click the name of your cluster and open the Hosts tab.
    3. Go to the Monitoring page.
    4. Find the resource in question: its chart will be approaching or crossing the limit.
    5. Select the other hosts from the drop-down list and check them as well.
  3. Check the VM or the server running the application connecting to your database for available resources.

Performance issuesPerformance issues

How do I find out what is causing performance degradation at peak loads?How do I find out what is causing performance degradation at peak loads?

Review the slow query log:

  1. In the MySQL® cluster settings, set Long query time to a value greater than zero.
  2. In the management console, select the Logs tab on the cluster page.
  3. In the top-left corner, select MYSQL_SLOW_QUERY from the drop-down list.

How do I find out what is causing overall performance degradation?How do I find out what is causing overall performance degradation?

Check host monitoring charts:

  1. Navigate to the folder dashboard and select Managed Service for MySQL.
  2. Click the name of your cluster and open the Hosts tab.
  3. Go to the Monitoring page:
    • We recommend upgrading your host class:
      • If the Steal value in the CPU usage chart remains consistently high.
      • If the Free value in the Memory usage chart remains consistently low.
    • High iowait values in the CPU usage chart may signal that the disk storage is hitting its IOPS limits. We recommend increasing the value to at least the next allocation unit threshold or using higher-speed disks. For more information about disk limits and performance, see this Yandex Compute Cloud article.

What causes a replica to lag?What causes a replica to lag?

  1. Check that slave_rows_search_algorithms is set to INDEX_SCAN,HASH_SCAN.
  2. For large tables, we recommend using pt-online-schema-change from the Percona Toolkit rather than ALTER TABLE statements to avoid locking.
  3. If the lag persists, enable parallel replication. To do this, configure the following settings:
    slave_parallel_type=LOGICAL_CLOCK
    slave_parallel_workers=8
    
  4. Run the SHOW SLAVE STATUS; command on the replica. If the Executed_Gtid_Set value remains unchanged for a long time, make sure all the tables have indexes.
  5. For continuous database writes on a host with 8 GB or more of RAM, we recommend increasing innodb_log_file_size up to 1 or 2 GB (changing this setting requires a server restart).

How do I find out why resources take long to load?How do I find out why resources take long to load?

Check host monitoring charts:

  1. Navigate to the folder dashboard and select Managed Service for MySQL.
  2. Click the name of your cluster and open the Hosts tab.
  3. Go to the Monitoring page.
  4. Find the resource in question: its chart will be approaching or crossing the limit.
  5. Select the other hosts from the drop-down list and check them as well.

If the charts do not show overloading of the cluster resources, follow the recommendations under Causes of locks and Query optimization.

How do I find out what is causing high CPU usage?How do I find out what is causing high CPU usage?

To get data on CPU usage, use system views. To access these views, you need the PROCESS administrative privilege for the cluster.

  1. Grant the PROCESS privilege to the user by running this CLI command:

    yc managed-mysql user update \
        --global-permissions PROCESS <username> \
        --cluster-id <cluster_ID>
    
  2. Use the following query to get the list of longest-running database queries:

    SELECT * FROM sys.statement_analysis LIMIT 10;
    

Pay attention to queries with high values for rows_examined and rows_sorted, or those with the full_scan flag, as they are likely to use the most CPU. For more information, see this MySQL® article.

How do I find out what is causing high I/O usage?How do I find out what is causing high I/O usage?

To get approximate I/O usage by MySQL® threads, use system views. To access these views, you need the PROCESS administrative privilege for the cluster.

  1. Grant the PROCESS privilege to the user by running this CLI command:

    yc managed-mysql user update \
        --global-permissions PROCESS <username> \
        --cluster-id <cluster_ID>
    
  2. Get the list of threads using the following query:

    SELECT   t.name             AS thread_name,
             t.processlist_user AS user,
             t.processlist_info AS query,
             t.processlist_time AS time,
             io.bytes           AS bytes
    FROM     performance_schema.threads t
    JOIN
             (
                      SELECT   thread_id,
                               sum(number_of_bytes) AS bytes
                      FROM     performance_schema.events_waits_history_long
                      WHERE    object_type='FILE'
                      GROUP BY thread_id) io
    ON       t.thread_id = io.thread_id
    ORDER BY io.bytes DESC;
    

Typically, the threads at the top of the table are those handling the buffer pool and replication, which is normal.

How do I find out what is causing high network usage?How do I find out what is causing high network usage?

High network load may result from a SELECT returning a large number of rows, an INSERT of large amounts of data, or an UPDATE affecting many rows. Writes will replicate changes to replica hosts, generating extra traffic.

To get approximate network usage by MySQL® threads, use system views. To access these views, you need the PROCESS administrative privilege for the cluster.

  1. Grant the PROCESS privilege to the user by running this CLI command:

    yc managed-mysql user update \
        --global-permissions PROCESS <username> \
        --cluster-id <cluster_ID>
    
  2. Get the list of threads using the following query:

    SELECT   t.name                       AS thread_name,
             t.processlist_user           AS user,
             t.processlist_info           AS query,
             t.processlist_time           AS time,
             net.bytes/t.processlist_time AS avg_bytes,
             net.bytes                    AS total_bytes
    FROM     performance_schema.threads t
    JOIN
             (
                      SELECT   thread_id,
                               Sum(variable_value) bytes
                      FROM     performance_schema.status_by_thread
                      WHERE    variable_name IN ('Bytes_sent',
                                                 'Bytes_received')
                      GROUP BY thread_id ) net
    ON       t.thread_id = net.thread_id
    WHERE    t.processlist_time IS NOT NULL
    ORDER BY net.bytes DESC;
    

    This query returns statistics since the threads were started, so long-lived connections, such as those used for replication, will be closer to the top.

How do I find out the causes of locks?How do I find out the causes of locks?

If the cluster resources are not overloaded yet queries run slowly, use system views to retrieve information on lock waits. To access these views, you need the PROCESS administrative privilege for the cluster.

  1. Grant the PROCESS privilege to the user by running this CLI command:

    yc managed-mysql user update \
        --global-permissions PROCESS <username> \
        --cluster-id <cluster_ID>
    
  2. To view table-level locks, run the following query:

    SELECT * FROM sys.schema_table_lock_waits
    
  3. To view row-level locks, run the following query:

    SELECT * FROM sys.innodb_lock_waits
    

For more information, see this MySQL® article.

How do I optimize queries with performance issues?How do I optimize queries with performance issues?

See the official MySQL® documentation:

  • Optimizing queries with EXPLAIN.
  • Optimizing SQL statements.
  • Optimizing tables.

Updating a clusterUpdating a cluster

Can I manage a cluster using SQL commands?Can I manage a cluster using SQL commands?

There are some restrictions on cluster management using SQL commands. For more information, see SQL command limits.

How do I reduce the size of a disk?How do I reduce the size of a disk?

You cannot reduce the size of a cluster storage.

You can create a new cluster with smaller storage and migrate your data to it.

How do I increase the size of a disk?How do I increase the size of a disk?

You cannot directly increase the size of non-replicated SSD storage: follow the steps outlined in this guide.

If you need it increased, restore the cluster from a backup and set the appropriate size.

You can check the disk type in the management console. To do this, find the Storage setting under Resources on the cluster page.

How do I change the disk type?How do I change the disk type?

To change the disk type, restore your cluster from a backup.

Why cannot I add or delete a host?Why cannot I add or delete a host?

The number of hosts in clusters is limited by quotas. Before adding a host, check the resources currently in use: open the Quotas page and find the Managed Databases section.

You can delete a host as long as it is not the only host in the cluster. To replace the only host, first create a new host and then delete the old one.

Clusters with local disks have a fault-tolerant three-host configuration. Using fewer hosts is not allowed.

How do I perform a manual failover?How do I perform a manual failover?

In a fault-tolerant multi-host cluster, you can switch the master role from the current master host to a replica host. After the failover, the current master host becomes a replica for the new master.

Management console
CLI
  1. Go to the cluster page and select the Hosts tab.
  2. Click Switch master.

If you do not have the Yandex Cloud CLI installed yet, install and initialize it.

By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.

To switch the master:

  1. See the description of the CLI command for initiating a failover:

    yc managed-mysql cluster start-failover --help
    
  2. Run the yc managed-mysql cluster start-failover command.

How do I restart a host?How do I restart a host?

You cannot restart a separate cluster host. To restart hosts, stop and restart the cluster.

Monitoring and logsMonitoring and logs

How do I view cluster and host charts?How do I view cluster and host charts?

In the management console, go to the cluster page. To view cluster charts, navigate to Monitoring. For individual host charts, go to Hosts → Monitoring.

To view charts in Yandex Monitoring, select the Managed Service for MySQL service dashboard on the home page. To view individual metrics, go to Metrics and set service to Managed Service for MySQL.

How do I view logs?How do I view logs?

Management console
CLI
  1. Go to the cluster page and open the Logs tab.
  2. At the top of the page, select a log:
    • MYSQL_ERROR: Primary MySQL® log with error messages, which is always enabled.
    • MYSQL_SLOW_QUERY: Information on slow queries. It is enabled if long_query_time is greater than 0.
    • MYSQL_AUDIT: Information on database connections.
    • MYSQL_GENERAL: Full query list. We recommend enabling it only for cluster debugging in a development environment.

If you do not have the Yandex Cloud CLI installed yet, install and initialize it.

By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.

  1. See the description of the CLI command for viewing logs:

    yc managed-mysql cluster list-logs --help
    
  2. Run the yc managed-mysql cluster cluster list-logs command.

What is the retention period for logs?What is the retention period for logs?

Cluster logs are stored for 30 days.

How do I view current queries?How do I view current queries?

To view the current user’s queries, run:

SHOW PROCESSLIST;

For a detailed description of the query result, see this MySQL® article.

What other diagnostic information is available?What other diagnostic information is available?

A user with the PROCESS cluster-level privilege can run the following queries:

  • SHOW FULL PROCESSLIST
  • SHOW ENGINE INNODB STATUS
  • SELECT from the performance_schema and sys system schemas.

To grant a user the PROCESS privilege, run this CLI command:

yc managed-mysql user update \
    --global-permissions PROCESS <username> \
    --cluster-id <cluster_ID>

How do I set up alerts?How do I set up alerts?

Use Yandex Monitoring. For the setup guide, see Creating an alert.

When selecting a metric, set service to Managed Service for MySQL.

How do I set up an alert that triggers as soon as a certain percentage of disk space has been used up?How do I set up an alert that triggers as soon as a certain percentage of disk space has been used up?

Create an alert for the disk.used_bytes metric in Yandex Monitoring. This metric shows the disk space usage in the Managed Service for MySQL® cluster.

For disk.used_bytes, use notification thresholds. Their recommended values are as follows:

  • Alarm: 90% of disk space
  • Warning: 80% of disk space

Thresholds values must be specified in bytes. For example, the recommended values for a 100 GB disk are as follows:

  • Alarm: 96636764160 bytes (90%)
  • Warning: 85899345920 bytes (80%)

Migration/transferMigration/transfer

How do I transfer data to a cluster?How do I transfer data to a cluster?

Follow the steps described in this tutorial.

How do I move a cluster to a different folder or cloud?How do I move a cluster to a different folder or cloud?

To move a cluster:

  • To a different folder: Restore the cluster from a backup. Specify the target folder when configuring the new cluster.
  • To a different cloud: Follow the steps in this tutorial.

External replication errorExternal replication error

Error message:

Last\_IO\_Error: 
Got fatal error 1236 from source when reading data from binary log: 
'Could not find first log file name in binary log index file'

This error may occur during external replication using the master host's specific FQDN if the master host in the source cluster has changed.

Solution:

  1. Restart replication.

  2. Run this command once:

    STOP SLAVE;
    CHANGE MASTER TO MASTER_AUTO_POSITION = 1;
    START SLAVE;
    

If the master host in the source cluster changes, the replication will be reconfigured to use the new master host. For more information about configurations, see this MySQL® article.

Configuring MySQL®Configuring MySQL®

How do I set a time zone?How do I set a time zone?

Time zones are set as UTC offsets. For example, use '+03:00' for Moscow. Time zone names are not supported.

For more information, see this MySQL® article.

How do I set SQL mode?How do I set SQL mode?

Follow the steps described in Managing databases.

What value should I set for innodb_buffer_pool_size?What value should I set for innodb_buffer_pool_size?

We recommend to set it within the following limits:

  • Minimum: 25% of the host RAM.
  • Maximum: 75% of the host RAM, provided that at least 1 to 1.6 GB are free for running queries, monitoring, and system processes.

How do I disable InnoDB strict mode?How do I disable InnoDB strict mode?

By default, InnoDB strict mode is enabled. If you disable it with MySQL® tools, the following error will occur:

Mysql query error: (1227) Access denied; you need (at least one of) the SYSTEM_VARIABLES_ADMIN or SESSION_VARIABLES_ADMIN privilege(s) for this operation (400)

To disable strict mode, change the innodb_strict_mode value via the Yandex Cloud interfaces. Also, make sure your configuration contains no command that disables strict mode, such as $connection–>queryExecute("SET innodb_strict_mode=0");.

How do I change character sets and collation rules?How do I change character sets and collation rules?

Follow the steps described in Managing databases.

How do I configure other settings?How do I configure other settings?

The MySQL® settings you can update are listed in this article. To change their values, use one of the available interfaces, such as the management console, CLI, API, or Terraform. For this, follow the steps outlined in Updating a cluster.

Was the article helpful?

Previous
Configuring MySQL
© 2025 Direct Cursus Technology L.L.C.