MySQL parameters
In this article:
MySQL parameters#
Parameters for creating a service#
These parameters are provided as parameters in the method CreateService.
When creating a new service, the parameters marked as Required should be provided.
If the selected version MySQL supports other parameters, they can be set in the options parameter.
vendor#
MySQL DBMS engine vendor.
Required |
Datatype |
Valid Values |
---|---|---|
Yes |
String |
mariadb |
version#
DBMS engine version. Version depends on the vendor.
Required |
Datatype |
Valid Values |
---|---|---|
Yes |
String |
mariadb: 10.2, 10.3, 10.4, 10.5, 10.6, 10.7; |
max_connections#
The maximum permitted number of simultaneous client connections that a MySQL host can handle
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
1–100000 |
151 |
MiB RAM/32, |
max_allowed_packet#
The maximum size of one packet or any generated/intermediate string, or any parameter sent by the`mysql_stmt_send_long_data() <https://dev.mysql.com/doc/c-api/8.0/en/mysql-stmt-send-long-data.html>`_.
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
Yes |
Integer |
1024–1073741824 |
16 MiB (MariaDB); |
N/A |
max_connect_errors#
Maximum number of connection errors, at which the server blocks the host from further connections
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
1– |
100 |
N/A |
innodb_buffer_pool_size#
InnoDB buffer size (in bytes) used to cache table data and indexes. A larger buffer allows you to reduce the number of I/O operations when repeatedly accessing the same data.
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
5242880– |
128 MiB |
50% RAM, if ≤ 4 GiB; |
innodb_buffer_pool_instances#
The number of regions that innodb_buffer_pool_size is divided into when innodb_buffer_pool_size > 1 GiB. Dividing the buffer pool allows you to use it more efficiently. This parameter is relevant for Percona 5.7, 8.0 и MariaDB 10.2, 10.3, 10.4.
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
1–64 |
8 or 1, if innodb_buffer_pool_size < 1GiB |
The number of full GiB in innodb_buffer_pool_size, if the parameter value is greater than 1 GiB |
innodb_log_file_size#
The size of a single file in bytes in the redo system log. The larger the value, the less checkpoint flush activity is required in the buffer pool, saving disk I/O.
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
4 MiB–512 GiB |
96 MiB (for MariaDB v.10.5 and higher) |
(innodb_buffer_pool_size × 25%)/2, but no more than 4 GiB |
innodb_log_files_in_group#
The number of system log files in a log group
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
2–100 |
2 |
N/A |
innodb_change_buffering#
This parameter controls the cached data to optimize delays for write operations to secondary indexes so that the I/O operations can be performed sequentially.
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
No |
String |
inserts |
none: ≥ MariaDB 10.5.15, 10.6.7, 10.7.3, 10.8.2; |
N/A |
innodb_io_capacity#
The number of I/O operations per second (IOPS) available to InnoDB background tasks.
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
100– |
200 |
N/A |
innodb_io_capacity_max#
The maximum number of IOPS that InnoDB background tasks can perform.
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
100– |
max(innodb_io_capacity × 2, 2000) |
N/A |
innodb_purge_threads#
The number of background threads allocated for the InnoDB purge operation. Increasing the value improve the efficiency systems where data operations are performed on multiple tables
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
1–32 |
4 |
N/A |
innodb_thread_concurrency#
The maximum number of threads permitted inside of InnoDB. This parameter is relevant for Percona 5.7, 8.0 and MariaDB 10.2, 10.3, 10.4.
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
0–1000 |
0 |
N/A |
innodb_sync_array_size#
The size of the mutex/lock wait array. Increasing the value increases the level of parallelism when the number of waiting threads is large. This parameter is relevant for Percona 5.7, 8.0 and MariaDB 10.2, 10.3, 10.4.
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
1–1024 |
1 |
N/A |
innodb_flush_log_at_trx_commit#
Controls the MySQL behaviour for transaction commit operations.
0
— Logs are written and flushed to disk once per second. Transactions for which logs have not been flushed can be lost in a crash.1
(default) — This value provides for the highest availability level. InnoDB redo logs are written and flushed to disk at each transaction commit.2
— InnoDB redo logs are written after each transaction commit and flushed to disk once per second. An OS or power outage can cause the loss of transactions in the last second.
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
0 |
1 |
N/A |
thread_cache_size#
The number of threads that the server caches to establish new network connections.
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
0–16384 |
-1 (autosizing) |
N/A |
tmp_table_size#
The maximum size of internal in-memory temporary tables (bytes). This parameter does not apply to user-created MEMORY tables.
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
1024–4294967295 |
16 MiB |
N/A |
max_heap_table_size#
The maximum size in bytes to which user-created MEMORY tables are permitted to grow. The value of the variable is used to calculate MEMORY table MAX_ROWS values.
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
16384–4294966272 |
16 MiB |
N/A |
table_open_cache#
The number of open tables for all threads. Increasing this value increases the number of file descriptors that mysqld requires.
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
1–1048576 |
MariaDB: 2000 |
N/A |
transaction_isolation#
The transaction isolation level. See the MySQL documentation.
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
No |
String |
REPEATABLE-READ |
REPEATABLE-READ |
N/A |
wait_timeout#
The number of seconds the server waits for activity on a noninteractive connection before closing it.
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
No |
Numeric |
1–31536000 |
28800 |
N/A |
connect_timeout#
The number of seconds that the mysqld server waits for a connect packet before responding with Bad handshake
.
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
No |
Numeric |
2–31536000 |
10 |
N/A |
pxc_strict_mode#
PXC mode. The supported modes are detailed in the Percona documentation. It is applicable only in a high-availability configuration and only to percona.
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
Yes, if the High-availability service mode and percona vendor are selected. |
String |
DISABLED |
ENFORCING |
DISABLED |
innodb_strict_mode#
A MySQL operation mode. The supported mode are detailed in the MySQL documentation.
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
Yes |
String |
ON |
ON |
OFF |
gcache_size#
Gcache circular buffer storage size (the space the node uses for caching writesets), preallocated on startup.
Galera parameter. It is applicable only to a high-availability service.
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
134217728–RAM/10 |
N/A |
N/A |
gcs_fc_limit#
If the recv queue length exceeds the number of writesets, replication is suspended. There can be much more writesets in master-slave configurations. Replication will resume according to the gcs_fc_factor setting.
Galera parameter. It is applicable only to a high-availability service.
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
No |
Integer |
1–2147483647 |
N/A |
N/A |
gcs_fc_factor#
The fraction of gcs_fc_limit at which replication is resumed when the recv queue length falls below this value.
Galera parameter. It is applicable only to a high-availability service.
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
No |
Float |
0.0–1.0 |
N/A |
N/A |
gcs_fc_master_slave#
This variable indicates whether the cluster has only one source node. This determines whether the gcs_fc_limit parameter is dynamically recalculated (if false
) or not (if true
).
Deprecated parameter. It is applicable only to Percona 5.7, MySQL 5.7, and MariaDB 10.2 and 10.3.
Galera parameter. It is applicable only to a high-availability service.
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
No |
Boolean |
true |
N/A |
N/A |
gcs_fc_single_primary#
Indicates that there is more than one replication source. As the number of nodes in the cluster grows, the value of gcs_fc_limit dynamically increases. At the same time, the number of writes from nodes also increases. When this parameter is false
(multi-primary), the gcs_fc_limit parameter is dynamically modified. This gives each node extra margin to be a bit further behind applying writes. The gcs_fc_limit parameter is modified as the square root of the cluster size, i.e., in a four-node cluster, it is twice the base value. This is done to compensate for the increasing replication rate noise.
This parameter replaces the deprecated gcs_fc_master_slave parameter and is applicable to Percona 8.0, MySQL 8.0, and MariaDB 10.4, 10.5, 10.6 and 10.7.
Galera parameter. It is applicable only to a high-availability service.
Required |
Datatype |
Valid Values |
Default |
Auto |
---|---|---|---|---|
No |
Boolean |
true |
N/A |
N/A |
monitoring - The monitoring information for the instance#
Connection to a monitoring service.
Required |
Editable |
Datatype |
Valid Values |
Default |
---|---|---|---|---|
For all services, except for Prometheus |
Yes |
Boolean |
true |
false |
monitor_by#
Monitoring service ID. The specified service must be deployed in the same project as the current service.
Required |
Editable |
Datatype |
Valid Values |
---|---|---|---|
Yes, if the |
Yes |
String |
The ID of a monitoring service running within the same VPC as the current service |
monitoring_labels#
Labels to be assigned to the metrics of the monitored service in the monitoring service.
Required |
Editable |
Datatype |
Valid Values |
---|---|---|---|
No. If |
Yes |
Dict |
The label name may contain digits, Latin letters, and an underscore character. The label value may contain any ASCII characters. |
logging#
Connection to a logging service.
Required |
Editable |
Datatype |
Valid Values |
Default |
---|---|---|---|---|
For all services, except for ELK and Prometheus |
Yes |
Boolean |
true |
false |
log_to#
Logging service ID. The logged service must be deployed in the same project as the current service.
Required |
Editable |
Datatype |
Valid Values |
Default |
---|---|---|---|---|
Yes, if the |
Yes |
String |
The ID of a monitoring service running within the same VPC as the current service |
options#
Container for other parameters MySQL.
Note
If the parameter name includes a dot, then it cannot be passed in the container for additional parameters. If you need to use such parameter, contact technical support.
Required |
Datatype |
Valid Values |
---|---|---|
No |
Dict |
N/A |
galera_options#
Container for other Galera parameters.
Note
If the parameter name includes a dot, then it cannot be passed in the container for additional parameters. If you need to use such parameter, contact technical support.
Required |
Datatype |
Valid Values |
---|---|---|
No |
Dict |
N/A |
User creation parameters#
These parameters are specified in the parameters attribute of the User object when the latter is passed in the users parameter of the ModifyService method.
The Editable property indicates whether the parameter value can be edited after the user has been created.
host#
Required |
Editable |
Datatype |
Valid Values |
Default |
---|---|---|---|---|
No |
No |
String |
Hostname up to 60 characters or IP address |
|
password#
Required |
Editable |
Datatype |
Valid Values |
Default |
---|---|---|---|---|
Yes |
Yes |
String |
It should not contain such characters as |
N/A |
Parameters for creating a database#
These parameters are specified in the parameters attribute of the Database object when the latter is passed in the databases parameter of the ModifyService method.
The Editable property indicates whether a parameter value can be edited after the database has been created.
The backup_id and backup_db_name parameters are used to restore a database from an existing backup. Information about existing backups can be obtained using the method ListBackups.
charset#
Required |
Editable |
Datatype |
Valid Values |
Default |
---|---|---|---|---|
No |
No |
String |
Supported values: |
utf8 |
collate#
Required |
Editable |
Datatype |
Valid Values |
Default |
---|---|---|---|---|
No |
No |
String |
Supported values: |
utf8_unicode_ci |
backup_id#
Database backup ID.
Required |
Editable |
Datatype |
Valid Values |
Default |
---|---|---|---|---|
No |
No |
String |
ID of an existing database backup. |
N/A |
backup_db_name#
The name of a database from the backup specified in the backup_id parameter.
Required |
Editable |
Datatype |
Valid Values |
Default |
---|---|---|---|---|
Yes, if backup_id is specified |
No |
String |
The name of a database included in the backup |
N/A |
User parameters to set when creating a database#
These parameters are specified in the parameters attribute of the User object, which is nested in the users attribute of the Database object when the latter is passed in the databases parameter of the ModifyService method.
The Editable property indicates whether a parameter value can be edited after the database has been created.
privileges#
Required |
Editable |
Datatype |
Valid Values |
Default |
---|---|---|---|---|
No |
Yes |
Array of strings |
ALL |
ALL |
options#
Required |
Editable |
Datatype |
Valid Values |
Default |
---|---|---|---|---|
No |
Yes |
Array of strings |
GRANT |
N/A |