MySQL Configuration Settings

Update your MySQL parameter configurations in a few simple clicks through the ScaleGrid console admin settings for your MySQL deployments.

The MySQL server has many operating parameters, which can be set through configuration file or option file (/etc/my.cnf). It is also possible to change many parameters at runtime. ScaleGrid console offers a simple user interface (UI) to configure some of the important parameters for your MySQL deployments.

Finding Your MySQL Configuration Settings

Here are the steps to access your MySQL configuration settings:

  1. Log into the ScaleGrid console.
  2. Go to your MySQL page, then click into your MySQL cluster you wish to configure.
  3. Select the Admin tab at the top.
  4. Click on the Configuration menu option on the left.
1583

As shown above, MySQL configuration parameter names, their current values, and a brief description about each parameter is presented in a tabular format in your admin configurations.

📘

Non-editable field values

The value field for some of the parameters are grayed out to indicate that these are not editable parameters for the deployment.

Updating Your MySQL Parameters

There is a search bar at the top as highlighted below for the easy access of the parameter that you would like to change.

For example, the screenshot below shows the parameter ‘sql_mode’ that can take a combination of many values and can be selected from a drop down list. Once selections are made, click on the green Save button to set this configuration for your MySQL deployment.

1350

After clicking the Save button, you will see a Confirmation Dialog showing a summary of changes you have made as below.

672

After clicking the green Confirm button, the configuration will be applied to your deployment through an ‘Update Configuration’ job that can be monitored from the Jobs tab.

464

Updating MySQL Configuration Parameters That Need a Server Restart

Some of the configuration settings in MySQL take effect only if the server is restarted. One such parameter is ‘innodb_log_file_size’. If you set this parameter and click on the Save button - the Confirmation dialog will show a Warning message that the config value will require a MySQL restart.

670

If you Confirm, then the configuration is applied on your MySQL deployment in a rolling fashion one server at a time and the server is restarted.

For instance, in a 3-node master-slave setup, the configuration is first applied on the slave nodes and then they are restarted. The Master is stepped down and one of the Slaves is promoted as a new Master. The configuration will then be applied on the old Master. The whole operation is done with minimal down time.

This rolling job can be monitored from the Jobs tab as below:

438

MySQL Parameter Names and Descriptions

Check out the list of MySQL parameters available to review and configure at ScaleGrid:

ParameterDescriptionEditable
portMySQL server portNo
skip_name_resolveDisable DNS name resolutionNo
userUser account that runs mysql service.No
pid_filePID fileNo
socketSocket fileNo
require_secure_transportServer mandates secure connections.No
sslEnable SSL on the server.No
log_binBasename with path of binary log files.No
expire_logs_daysNumber of days for automatic binary log file removal.Yes
sync_binlogNumber of binary log commit groups to collect before synchronizing the binary log to disk.No
binlog_group_commit_sync_delayNumber of microseconds the binary log commit waits before synchronizing the binary log file to disk.Yes
max_connect_errorsMax number of connection errors from a host before these server blocks it from further connections.Yes
max_allowed_packetMaximum size of a packet (Bytes) that the server can send and receive.Yes
max_heap_table_sizeMaximum size to which user-created MEMORY tables are permitted to grow.No
max_connectionsMaximum permitted number of simultaneous client connections.Yes
max_user_connectionsMaximum permitted number of simultaneous client connections.No
thread_cache_sizeNumber of threads the server should cache for reuse.Yes
open_files_limitNumber of file descriptors available to mysqld.Yes
table_open_cacheNumber of open tables for all threads.No
table_definition_cacheNumber of table definitions that can be stored in definition cache.No
relay_logBasename with path of relay log files.No
gtid_modeEnable GTID based loggingNo
enforce_gtid_consistencyServer allows execution of only statements that can be safely logged using a GTID.No
binlog_formatBinary log formatNo
log_slave_updatesControls whether updates received by a slave server from a master server should be logged to the slave's own binary log.No
slave_net_timeoutNumber of seconds to wait for more data from a master/slave connection before aborting the read.Yes
master_info_repositoryTo determine whether master info is maintained in a file or table.No
relay_log_info_repositoryTo determine whether the relay logs are maintained as a file or table.No
sync_master_infoNumber of events after which slave updates the IO thread position in its master info repository table.No
sync_relay_logNumber of events to relay log after which slave flushes the relay logs to disk.No
relay_log_recoveryEnable automatic relay log recovery immediately following server startup.No
slave_parallel_workersNumber of slave applier threads for executing replication transactions in parallel.Yes
slave_preserve_commit_orderEnsure transaction commit happens in the same order as they appear in slave relay log.No
slave_parallel_typePolicy to decide parallel transaction execution.No
rpl_semi_sync_master_timeoutTime in milliseconds after which master switches to async mode of replication if it has not received back from slave.Yes
rpl_semi_sync_master_wait_for_slave_countThe number of slave acknowledgments the master must receive per transaction before proceeding.No
rpl_semi_sync_master_wait_no_slaveControls whether the master waits for the timeout period configured by rpl_semi_sync_master_timeout to expire, even if the slave count drops to less than the number of slaves configured by rpl_semi_sync_master_wait_for_slave_count during the timeout period.No
relay_log_space_limitAn upper limit on the total size (in bytes) of all relay logs on the slave. A value of 0 means "no limit".Yes
max_relay_log_sizeMaximum size (in bytes) of a slave relay log after which it rotates. Value of 0 means this size will be same as max_binlog_size.Yes
max_binlog_sizeMaximum size (in bytes) of a binary log after which it rotates.Yes
datadirThe path to the MySQL server data directory.No
general_logEnable General logNo
general_log_fileGeneral Log FileNo
log_errorError log fileNo
default_storage_engineStorage Engine for MySQLNo
innodb_log_files_in_groupNumber of log files in the log_group.No
innodb_flush_log_at_trx_commitFrequency of transactions at which InnoDB log buffer is written to the log and flushed to disk.No
innodb_flush_methodMethod used to flush data to InnoDB data and log files.No
innodb_file_per_tableDetermines whether each newly created table will have its data and index as part of separate ibd file.No
innodb_log_file_sizeDefines the size (in bytes) of each log file in a log_group.Yes
innodb_buffer_pool_sizeSize (in bytes) of memory used by InnoDB to cache table and index data.Yes
innodb_io_capacityUpper limit on the number of I/O operations performed per second by InnoDB background tasks.Yes
innodb_adaptive_hash_indexIndicates whether InnoDB adaptive hash indexes are enabled or disabled.Yes
innodb_lock_wait_timeoutLength of time in seconds an InnoDB transaction waits for a row lock before giving up.Yes
log_queries_not_using_indexesLogs queries that are expected to retrieve all rows to slow query log.Yes
log_slow_admin_statementsInclude slow administrative statements in the statements written to the slow query log.Yes
log_throttle_queries_not_using_indexesVariable to limit the number of slow queries per minute that can be written to the slow query log.Yes
long_query_timeIf a query takes longer than this many seconds, it is considered as a slow query.Yes
slow_query_logGenerate slow query log filesNo
slow_query_log_fileName of the slow query log fileNo
symbolic_linksEnable symbolic link supportNo
interactive_timeoutNumber of seconds the server waits for activity on an interactive connection before closing it.Yes
div_precision_incrementNumber of seconds the server waits for activity on an interactive connection before closing it.Yes
sql_modeSet of options that decides syntax supported by MySQL and also data validation checks it performs.Yes
event_schedulerState of the Event SchedulerYes