MySQL Settings

When creating a MySQL database cluster, values for all settings are set automatically. The values are preset to ensure high cluster performance. The values differ depending on the cluster configuration and MySQL version.

If the automatic values do not match your tasks, you can set your own values when creating a cluster or change them in an already created cluster.

We recommend changing settings only if you know exactly why you need to do it, as incorrectly adjusted values can reduce cluster performance.

CHARSET and COLLATION

MySQL uses utf8mb4 as an encoding (CHARSET).

The following are used as a sorting algorithm (COLLATION):

  • utf8mb4_general_ci in MySQL 5.7
  • utf8mb4_0900_ai_ci in MySQL 8

These are the default values. You can change the CHARSET and COLLATION values when creating objects.

View the Settings List

Detailed description of settings is provided in the official MySQL documentation.

You can view the list of settings that can be changed when creating a cluster or in an already created cluster when changing settings.

If you have previously changed settings, you can see a list of all changes.

  1. From the Control panel, go to the Cloud platform ⟶ Managed Databases section.
  2. Open the cluster page Settings tab.
  3. The previously changed settings (name and value) will be displayed in the DBMS Settings block.

Change Settings

Changing some parameters in settings entails restarting the databases in the cluster — the cluster may not be available at that time. These settings depend on the MySQL version — their list can be found [here](/selectel-cloud-platform/managed-databases/mysql/mysql_settings/#list-of-settings-that-require-a-restart).
  1. From the Control panel, go to the Cloud platform ⟶ Managed Databases section.
  2. Open the cluster page Settings tab.
  3. Click Edit and specify the new values in the DBMS Settings block.
  4. Click Save.

List of Settings that Require a Restart

MySQL 5.7

innodb_autoinc_lock_mode, innodb_log_file_size, innodb_buffer_pool_instances, thread_pool_size, innodb_adaptive_hash_index_parts, innodb_buffer_pool_load_at_startup, innodb_ft_cache_size, innodb_ft_max_token_size, innodb_ft_min_token_size, innodb_ft_sort_pll_degree, innodb_ft_total_cache_size, innodb_log_buffer_size, innodb_page_cleaners, innodb_flush_method, innodb_purge_threads, innodb_read_io_threads, innodb_rollback_on_timeout, innodb_sort_buffer_size, innodb_sync_array_size, innodb_write_io_threads, max_digest_length, table_open_cache_instances, innodb_commit_concurrency, thread_stack

MySQL 8

innodb_flush_method, innodb_adaptive_hash_index_parts, innodb_autoinc_lock_mode, innodb_buffer_pool_load_at_startup, innodb_ft_cache_size, innodb_ft_max_token_size, innodb_ft_min_token_size, innodb_ft_sort_pll_degree, innodb_ft_total_cache_size, innodb_page_cleaners, innodb_purge_threads, innodb_read_io_threads, innodb_rollback_on_timeout, innodb_sort_buffer_size, innodb_sync_array_size, innodb_write_io_threads, max_digest_length, table_open_cache_instances, innodb_log_file_size, innodb_buffer_pool_instances, thread_pool_size, innodb_commit_concurrency, thread_stack

Settings when Scaling a Cluster

Each cluster configuration has limits of acceptable values. When scaling a cluster (changing its configuration), the values of some settings are automatically changed to acceptable ones for a proper cluster operation.

A list of settings that change values when scaling a cluster:

innodb_buffer_pool_size, innodb_log_file_size, innodb_buffer_pool_instances, thread_pool_size, max_heap_table_size, tmp_table_size, temptable_max_ram

When the cluster is scaled up and its status changes to ACTIVE, you can set new values — change settings.