MySQL 5.6 Reference Manual Including MySQL NDB Cluster 7.3-7.4 Reference Guide

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.5 Dynamic System Variable Summary

Variable Name Variable Type Variable Scope
audit_log_connection_policy Enumeration Global
audit_log_exclude_accounts String Global
audit_log_flush Boolean Global
audit_log_include_accounts String Global
audit_log_policy Enumeration Global
audit_log_rotate_on_size Integer Global
audit_log_statement_policy Enumeration 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_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
binlogging_impossible_mode Enumeration Both
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
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_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
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
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_buffer_pool_dump_at_shutdown Boolean Global
innodb_buffer_pool_dump_now Boolean Global
innodb_buffer_pool_filename File name Global
innodb_buffer_pool_load_abort Boolean Global
innodb_buffer_pool_load_now Boolean 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_compression_failure_threshold_pct Integer Global
innodb_compression_level Integer Global
innodb_compression_pad_pct_max Integer Global
innodb_concurrency_tickets Integer 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_flush_log_at_timeout Integer Global
innodb_flush_log_at_trx_commit Enumeration Global
innodb_flush_neighbors Enumeration 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_compressed_pages Boolean 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_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_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_logs Integer Global
insert_id Integer Session
interactive_timeout Integer Both
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
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_output Set Global
log_queries_not_using_indexes Boolean Global
log_slow_admin_statements Boolean Global
log_slow_slave_statements Boolean Global
log_throttle_queries_not_using_indexes Integer Global
log_warnings Integer Varies
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_heap_table_size Integer Both
max_insert_delayed_threads Integer Both
max_join_size Integer Both
max_length_for_sort_data 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
ndb_autoincrement_prefetch_sz 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_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_index_stat_cache_entries Integer Both
ndb_index_stat_enable Boolean Both
ndb_index_stat_option String Both
ndb_index_stat_update_freq Integer Both
ndb_join_pushdown Boolean Both
ndb_log_bin 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_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_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
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
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
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
relay_log_recovery Boolean 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_no_slave Boolean 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
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_workers Integer Global
slave_pending_jobs_size_max Integer 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
storage_engine Enumeration Both
stored_program_cache Integer 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 Both
thread_pool_stall_limit Integer Global
time_zone String Both
timed_mutexes Boolean Global
timestamp Numeric Session
tmp_table_size Integer Both
transaction_alloc_block_size Integer Both
transaction_allow_batching Boolean Session
transaction_prealloc_size Integer Both
tx_isolation Enumeration Both
tx_read_only Boolean Both
unique_checks Boolean Both
updatable_views_with_limit Boolean Both
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
wait_timeout Integer Both