Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 35.1Mb
PDF (A4) - 35.2Mb
Man Pages (TGZ) - 255.8Kb
Man Pages (Zip) - 360.7Kb
Info (Gzip) - 3.4Mb
Info (Zip) - 3.4Mb
Excerpts from this Manual

5.1.8.2 Dynamic System Variables

Many server system variables are dynamic and can be set at runtime. See Section 13.7.4.1, “SET Syntax for Variable Assignment”. For a description of the privilege requirements for setting system variables, see Section 5.1.8.1, “System Variable Privileges”

The following table lists all dynamic system variables applicable within mysqld.

The table lists each variable's data type and scope. The last column indicates whether the scope for each variable is Global, Session, or both. Please see the corresponding item descriptions for details on setting and using the variables. Where appropriate, direct links to further information about the items are provided.

Variables that have a type of string take a string value. Variables that have a type of numeric take a numeric value. Variables that have a type of boolean can be set to 0, 1, ON or OFF. Variables that are marked as enumeration normally should be set to one of the available values for the variable, but can also be set to the number that corresponds to the desired enumeration value. For enumerated system variables, the first enumeration value corresponds to 0. This differs from the ENUM data type used for table columns, for which the first enumeration value corresponds to 1.

Table 5.4 Dynamic System Variable Summary

Variable Name Variable Type Variable Scope
audit_log_connection_policy Enumeration Global
audit_log_disable Boolean Global
audit_log_exclude_accounts String Global
audit_log_flush Boolean Global
audit_log_format_unix_timestamp Boolean Global
audit_log_include_accounts String Global
audit_log_read_buffer_size Integer Varies
audit_log_rotate_on_size Integer Global
audit_log_statement_policy Enumeration Global
authentication_ldap_sasl_auth_method_name String Global
authentication_ldap_sasl_bind_base_dn String Global
authentication_ldap_sasl_bind_root_dn String Global
authentication_ldap_sasl_bind_root_pwd String Global
authentication_ldap_sasl_ca_path String Global
authentication_ldap_sasl_group_search_attr String Global
authentication_ldap_sasl_group_search_filter String Global
authentication_ldap_sasl_init_pool_size Integer Global
authentication_ldap_sasl_log_status Integer Global
authentication_ldap_sasl_max_pool_size Integer Global
authentication_ldap_sasl_server_host String Global
authentication_ldap_sasl_server_port Integer Global
authentication_ldap_sasl_tls Boolean Global
authentication_ldap_sasl_user_search_attr String Global
authentication_ldap_simple_auth_method_name String Global
authentication_ldap_simple_bind_base_dn String Global
authentication_ldap_simple_bind_root_dn String Global
authentication_ldap_simple_bind_root_pwd String Global
authentication_ldap_simple_ca_path String Global
authentication_ldap_simple_group_search_attr String Global
authentication_ldap_simple_group_search_filter String Global
authentication_ldap_simple_init_pool_size Integer Global
authentication_ldap_simple_log_status Integer Global
authentication_ldap_simple_max_pool_size Integer Global
authentication_ldap_simple_server_host String Global
authentication_ldap_simple_server_port Integer Global
authentication_ldap_simple_tls Boolean Global
authentication_ldap_simple_user_search_attr String Global
auto_increment_increment Integer Both
auto_increment_offset Integer Both
autocommit Boolean Both
automatic_sp_privileges Boolean Global
avoid_temporal_upgrade Boolean Global
big_tables Boolean Both
binlog_cache_size Integer Global
binlog_checksum String Global
binlog_direct_non_transactional_updates Boolean Both
binlog_error_action Enumeration Global
binlog_format Enumeration Both
binlog_group_commit_sync_delay Integer Global
binlog_group_commit_sync_no_delay_count Integer Global
binlog_max_flush_queue_time Integer Global
binlog_order_commits Boolean Global
binlog_row_image Enumeration Both
binlog_rows_query_log_events Boolean Both
binlog_stmt_cache_size Integer Global
binlog_transaction_dependency_history_size Integer Global
binlog_transaction_dependency_tracking Enumeration Global
block_encryption_mode String Both
bulk_insert_buffer_size Integer Both
character_set_client String Both
character_set_connection String Both
character_set_database String Both
character_set_filesystem String Both
character_set_results String Both
character_set_server String Both
check_proxy_users Boolean Global
collation_connection String Both
collation_database String Both
collation_server String Both
completion_type Enumeration Both
concurrent_insert Enumeration Global
connect_timeout Integer Global
connection_control_failed_connections_threshold Integer Global
connection_control_max_connection_delay Integer Global
connection_control_min_connection_delay Integer Global
debug String Both
debug_sync String Session
default_password_lifetime Integer Global
default_storage_engine Enumeration Both
default_tmp_storage_engine Enumeration Both
default_week_format Integer Both
delay_key_write Enumeration Global
delayed_insert_limit Integer Global
delayed_insert_timeout Integer Global
delayed_queue_size Integer Global
div_precision_increment Integer Both
end_markers_in_json Boolean Both
enforce_gtid_consistency Enumeration Global
eq_range_index_dive_limit Integer Both
event_scheduler Enumeration Global
expire_logs_days Integer Global
explicit_defaults_for_timestamp Boolean Both
flush Boolean Global
flush_time Integer Global
foreign_key_checks Boolean Both
ft_boolean_syntax String Global
general_log Boolean Global
general_log_file File name Global
group_concat_max_len Integer Both
group_replication_allow_local_disjoint_gtids_join Boolean Global
group_replication_allow_local_lower_version_join Boolean Global
group_replication_auto_increment_increment Integer Global
group_replication_bootstrap_group Boolean Global
group_replication_components_stop_timeout Integer Global
group_replication_compression_threshold Integer Global
group_replication_enforce_update_everywhere_checks Boolean Global
group_replication_exit_state_action Enumeration Global
group_replication_flow_control_applier_threshold Integer Global
group_replication_flow_control_certifier_threshold Integer Global
group_replication_flow_control_mode Enumeration Global
group_replication_force_members String Global
group_replication_group_name String Global
group_replication_group_seeds String Global
group_replication_gtid_assignment_block_size Integer Global
group_replication_ip_whitelist String Global
group_replication_local_address String Global
group_replication_member_weight Integer Global
group_replication_poll_spin_loops Integer Global
group_replication_recovery_complete_at Enumeration Global
group_replication_recovery_reconnect_interval Integer Global
group_replication_recovery_retry_count Integer Global
group_replication_recovery_ssl_ca String Global
group_replication_recovery_ssl_capath String Global
group_replication_recovery_ssl_cert String Global
group_replication_recovery_ssl_cipher String Global
group_replication_recovery_ssl_crl File name Global
group_replication_recovery_ssl_crlpath Directory name Global
group_replication_recovery_ssl_key String Global
group_replication_recovery_ssl_verify_server_cert Boolean Global
group_replication_recovery_use_ssl Boolean Global
group_replication_single_primary_mode Boolean Global
group_replication_ssl_mode Enumeration Global
group_replication_start_on_boot Boolean Global
group_replication_transaction_size_limit Integer Global
group_replication_unreachable_majority_timeout Integer Global
gtid_executed_compression_period Integer Global
gtid_mode Enumeration Global
gtid_next Enumeration Session
gtid_purged String Global
host_cache_size Integer Global
identity Integer Session
init_connect String Global
init_slave String Global
innodb_adaptive_flushing Boolean Global
innodb_adaptive_flushing_lwm Integer Global
innodb_adaptive_hash_index Boolean Global
innodb_adaptive_max_sleep_delay Integer Global
innodb_api_bk_commit_interval Integer Global
innodb_api_trx_level Integer Global
innodb_autoextend_increment Integer Global
innodb_background_drop_list_empty Boolean Global
innodb_buffer_pool_dump_at_shutdown Boolean Global
innodb_buffer_pool_dump_now Boolean Global
innodb_buffer_pool_dump_pct Integer Global
innodb_buffer_pool_filename File name Global
innodb_buffer_pool_load_abort Boolean Global
innodb_buffer_pool_load_now Boolean Global
innodb_buffer_pool_size Integer Global
innodb_change_buffer_max_size Integer Global
innodb_change_buffering Enumeration Global
innodb_change_buffering_debug Integer Global
innodb_checksum_algorithm Enumeration Global
innodb_cmp_per_index_enabled Boolean Global
innodb_commit_concurrency Integer Global
innodb_compress_debug Enumeration Global
innodb_compression_failure_threshold_pct Integer Global
innodb_compression_level Integer Global
innodb_compression_pad_pct_max Integer Global
innodb_concurrency_tickets Integer Global
innodb_deadlock_detect Boolean Global
innodb_default_row_format Enumeration Global
innodb_disable_resize_buffer_pool_debug Boolean Global
innodb_disable_sort_file_cache Boolean Global
innodb_fast_shutdown Integer Global
innodb_fil_make_page_dirty_debug Integer Global
innodb_file_format String Global
innodb_file_format_max String Global
innodb_file_per_table Boolean Global
innodb_fill_factor Integer Global
innodb_flush_log_at_timeout Integer Global
innodb_flush_log_at_trx_commit Enumeration Global
innodb_flush_neighbors Enumeration Global
innodb_flush_sync Boolean Global
innodb_flushing_avg_loops Integer Global
innodb_ft_aux_table String Global
innodb_ft_enable_diag_print Boolean Global
innodb_ft_enable_stopword Boolean Both
innodb_ft_num_word_optimize Integer Global
innodb_ft_result_cache_limit Integer Global
innodb_ft_server_stopword_table String Global
innodb_ft_user_stopword_table String Both
innodb_io_capacity Integer Global
innodb_io_capacity_max Integer Global
innodb_large_prefix Boolean Global
innodb_limit_optimistic_insert_debug Integer Global
innodb_lock_wait_timeout Integer Both
innodb_log_checkpoint_now Boolean Global
innodb_log_checksums Boolean Global
innodb_log_compressed_pages Boolean Global
innodb_log_write_ahead_size Integer Global
innodb_lru_scan_depth Integer Global
innodb_max_dirty_pages_pct Numeric Global
innodb_max_dirty_pages_pct_lwm Numeric Global
innodb_max_purge_lag Integer Global
innodb_max_purge_lag_delay Integer Global
innodb_max_undo_log_size Integer Global
innodb_merge_threshold_set_all_debug Integer Global
innodb_monitor_disable String Global
innodb_monitor_enable String Global
innodb_monitor_reset Enumeration Global
innodb_monitor_reset_all Enumeration Global
innodb_old_blocks_pct Integer Global
innodb_old_blocks_time Integer Global
innodb_online_alter_log_max_size Integer Global
innodb_optimize_fulltext_only Boolean Global
innodb_print_all_deadlocks Boolean Global
innodb_purge_batch_size Integer Global
innodb_purge_rseg_truncate_frequency Integer Global
innodb_random_read_ahead Boolean Global
innodb_read_ahead_threshold Integer Global
innodb_replication_delay Integer Global
innodb_rollback_segments Integer Global
innodb_saved_page_number_debug Integer Global
innodb_spin_wait_delay Integer Global
innodb_stats_auto_recalc Boolean Global
innodb_stats_include_delete_marked Boolean Global
innodb_stats_method Enumeration Global
innodb_stats_on_metadata Boolean Global
innodb_stats_persistent Boolean Global
innodb_stats_persistent_sample_pages Integer Global
innodb_stats_sample_pages Integer Global
innodb_stats_transient_sample_pages Integer Global
innodb_status_output Boolean Global
innodb_status_output_locks Boolean Global
innodb_strict_mode Boolean Both
innodb_support_xa Boolean Both
innodb_sync_spin_loops Integer Global
innodb_table_locks Boolean Both
innodb_thread_concurrency Integer Global
innodb_thread_sleep_delay Integer Global
innodb_tmpdir Directory name Both
innodb_trx_purge_view_update_only_debug Boolean Global
innodb_trx_rseg_n_slots_debug Integer Global
innodb_undo_log_truncate Boolean Global
innodb_undo_logs Integer Global
insert_id Integer Session
interactive_timeout Integer Both
internal_tmp_disk_storage_engine Enumeration Global
join_buffer_size Integer Both
keep_files_on_create Boolean Both
key_buffer_size Integer Global
key_cache_age_threshold Integer Global
key_cache_block_size Integer Global
key_cache_division_limit Integer Global
keyring_aws_cmk_id String Global
keyring_aws_region Enumeration Global
keyring_encrypted_file_data File name Global
keyring_encrypted_file_password String Global
keyring_file_data File name Global
keyring_okv_conf_dir Directory name Global
keyring_operations Boolean Global
last_insert_id Integer Session
lc_messages String Both
lc_time_names String Both
local_infile Boolean Global
lock_wait_timeout Integer Both
log_bin_trust_function_creators Boolean Global
log_bin_use_v1_row_events Boolean Global
log_builtin_as_identified_by_password Boolean Global
log_error_verbosity Integer Global
log_output Set Global
log_queries_not_using_indexes Boolean Global
log_slow_admin_statements Boolean Global
log_slow_slave_statements Boolean Global
log_statements_unsafe_for_binlog Boolean Global
log_syslog Boolean Global
log_syslog_facility String Global
log_syslog_include_pid Boolean Global
log_syslog_tag String Global
log_throttle_queries_not_using_indexes Integer Global
log_timestamps Enumeration Global
log_warnings Integer Global
long_query_time Numeric Both
low_priority_updates Boolean Both
master_info_repository String Global
master_verify_checksum Boolean Global
max_allowed_packet Integer Both
max_binlog_cache_size Integer Global
max_binlog_size Integer Global
max_binlog_stmt_cache_size Integer Global
max_connect_errors Integer Global
max_connections Integer Global
max_delayed_threads Integer Both
max_error_count Integer Both
max_execution_time Integer Both
max_heap_table_size Integer Both
max_insert_delayed_threads Integer Both
max_join_size Integer Both
max_length_for_sort_data Integer Both
max_points_in_geometry Integer Both
max_prepared_stmt_count Integer Global
max_relay_log_size Integer Global
max_seeks_for_key Integer Both
max_sort_length Integer Both
max_sp_recursion_depth Integer Both
max_tmp_tables Integer Both
max_user_connections Integer Both
max_write_lock_count Integer Global
min_examined_row_limit Integer Both
multi_range_count Integer Both
myisam_data_pointer_size Integer Global
myisam_max_sort_file_size Integer Global
myisam_repair_threads Integer Both
myisam_sort_buffer_size Integer Both
myisam_stats_method Enumeration Both
myisam_use_mmap Boolean Global
mysql_firewall_mode Boolean Global
mysql_firewall_trace Boolean Global
mysql_native_password_proxy_users Boolean Global
mysqlx_connect_timeout Integer Global
mysqlx_idle_worker_thread_timeout Integer Global
mysqlx_max_allowed_packet Integer Global
mysqlx_max_connections Integer Global
mysqlx_min_worker_threads Integer Global
ndb_allow_copying_alter_table Boolean Both
ndb_autoincrement_prefetch_sz Integer Both
ndb_batch_size Integer Both
ndb_blob_read_batch_bytes Integer Both
ndb_blob_write_batch_bytes Integer Both
ndb_cache_check_time Integer Global
ndb_clear_apply_status Boolean Global
ndb_data_node_neighbour Integer Global
ndb_default_column_format Enumeration Global
ndb_default_column_format Enumeration Global
ndb_deferred_constraints Integer Both
ndb_deferred_constraints Integer Both
ndb_distribution Enumeration Global
ndb_distribution Enumeration Global
ndb_eventbuffer_free_percent Integer Global
ndb_eventbuffer_max_alloc Integer Global
ndb_extra_logging Integer Global
ndb_force_send Boolean Both
ndb_fully_replicated Boolean Both
ndb_index_stat_enable Boolean Both
ndb_index_stat_option String Both
ndb_join_pushdown Boolean Both
ndb_log_binlog_index Boolean Global
ndb_log_empty_epochs Boolean Global
ndb_log_empty_epochs Boolean Global
ndb_log_empty_update Boolean Global
ndb_log_empty_update Boolean Global
ndb_log_exclusive_reads Boolean Both
ndb_log_exclusive_reads Boolean Both
ndb_log_update_as_write Boolean Global
ndb_log_update_minimal Boolean Global
ndb_log_updated_only Boolean Global
ndb_optimization_delay Integer Global
ndb_read_backup Boolean Global
ndb_recv_thread_activation_threshold Integer Global
ndb_recv_thread_cpu_mask Bitmap Global
ndb_report_thresh_binlog_epoch_slip Integer Global
ndb_report_thresh_binlog_mem_usage Integer Global
ndb_row_checksum Integer Both
ndb_show_foreign_key_mock_tables Boolean Global
ndb_slave_conflict_role Enumeration Global
ndb_table_no_logging Boolean Session
ndb_table_temporary Boolean Session
ndb_use_exact_count Boolean Both
ndb_use_transactions Boolean Both
ndbinfo_max_bytes Integer Both
ndbinfo_max_rows Integer Both
ndbinfo_offline Boolean Global
ndbinfo_show_hidden Boolean Both
net_buffer_length Integer Both
net_read_timeout Integer Both
net_retry_count Integer Both
net_write_timeout Integer Both
new Boolean Both
offline_mode Boolean Global
old_alter_table Boolean Both
old_passwords Enumeration Both
optimizer_prune_level Integer Both
optimizer_search_depth Integer Both
optimizer_switch Set Both
optimizer_trace String Both
optimizer_trace_features String Both
optimizer_trace_limit Integer Both
optimizer_trace_max_mem_size Integer Both
optimizer_trace_offset Integer Both
parser_max_mem_size Integer Both
performance_schema_show_processlist Boolean Global
preload_buffer_size Integer Both
profiling Boolean Both
profiling_history_size Integer Both
pseudo_slave_mode Boolean Session
pseudo_thread_id Integer Session
query_alloc_block_size Integer Both
query_cache_limit Integer Global
query_cache_min_res_unit Integer Global
query_cache_size Integer Global
query_cache_type Enumeration Both
query_cache_wlock_invalidate Boolean Both
query_prealloc_size Integer Both
rand_seed1 Integer Session
rand_seed2 Integer Session
range_alloc_block_size Integer Both
range_optimizer_max_mem_size Integer Both
rbr_exec_mode Enumeration Session
read_buffer_size Integer Both
read_only Boolean Global
read_rnd_buffer_size Integer Both
relay_log_info_repository String Global
relay_log_purge Boolean Global
replication_optimize_for_static_plugin_config Boolean Global
replication_sender_observe_commit_only Boolean Global
require_secure_transport Boolean Global
rewriter_enabled Boolean Global
rewriter_verbose Integer Global
rpl_semi_sync_master_enabled Boolean Global
rpl_semi_sync_master_timeout Integer Global
rpl_semi_sync_master_trace_level Integer Global
rpl_semi_sync_master_wait_for_slave_count Integer Global
rpl_semi_sync_master_wait_no_slave Boolean Global
rpl_semi_sync_master_wait_point Enumeration Global
rpl_semi_sync_slave_enabled Boolean Global
rpl_semi_sync_slave_trace_level Integer Global
rpl_stop_slave_timeout Integer Global
secure_auth Boolean Global
server_id Integer Global
session_track_gtids Enumeration Both
session_track_schema Boolean Both
session_track_state_change Boolean Both
session_track_system_variables String Both
session_track_transaction_info Enumeration Both
sha256_password_proxy_users Boolean Global
show_compatibility_56 Boolean Global
show_create_table_verbosity Boolean Both
show_old_temporals Boolean Both
slave_allow_batching Boolean Global
slave_checkpoint_group Integer Global
slave_checkpoint_period Integer Global
slave_compressed_protocol Boolean Global
slave_exec_mode Enumeration Global
slave_max_allowed_packet Integer Global
slave_net_timeout Integer Global
slave_parallel_type Enumeration Global
slave_parallel_workers Integer Global
slave_pending_jobs_size_max Integer Global
slave_preserve_commit_order Boolean Global
slave_rows_search_algorithms Set Global
slave_sql_verify_checksum Boolean Global
slave_transaction_retries Integer Global
slave_type_conversions Set Global
slow_launch_time Integer Global
slow_query_log Boolean Global
slow_query_log_file File name Global
sort_buffer_size Integer Both
sql_auto_is_null Boolean Both
sql_big_selects Boolean Both
sql_buffer_result Boolean Both
sql_log_bin Boolean Session
sql_log_off Boolean Both
sql_mode Set Both
sql_notes Boolean Both
sql_quote_show_create Boolean Both
sql_safe_updates Boolean Both
sql_select_limit Integer Both
sql_slave_skip_counter Integer Global
sql_warnings Boolean Both
stored_program_cache Integer Global
super_read_only Boolean Global
sync_binlog Integer Global
sync_frm Boolean Global
sync_master_info Integer Global
sync_relay_log Integer Global
sync_relay_log_info Integer Global
table_definition_cache Integer Global
table_open_cache Integer Global
thread_cache_size Integer Global
thread_pool_high_priority_connection Integer Both
thread_pool_max_unused_threads Integer Global
thread_pool_prio_kickup_timer Integer Global
thread_pool_stall_limit Integer Global
time_zone String Both
timestamp Numeric Session
tmp_table_size Integer Both
transaction_alloc_block_size Integer Both
transaction_allow_batching Boolean Session
transaction_isolation Enumeration Both
transaction_prealloc_size Integer Both
transaction_read_only Boolean Both
transaction_write_set_extraction Enumeration Both
tx_isolation Enumeration Both
tx_read_only Boolean Both
unique_checks Boolean Both
updatable_views_with_limit Boolean Both
validate_password_check_user_name Boolean Global
validate_password_dictionary_file File name Global
validate_password_length Integer Global
validate_password_mixed_case_count Integer Global
validate_password_number_count Integer Global
validate_password_policy Enumeration Global
validate_password_special_char_count Integer Global
version_tokens_session String Both
wait_timeout Integer Both