Documentation Home
MySQL 5.5 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 26.9Mb
PDF (A4) - 27.0Mb
PDF (RPM) - 25.5Mb
HTML Download (TGZ) - 6.4Mb
HTML Download (Zip) - 6.4Mb
HTML Download (RPM) - 5.4Mb
Man Pages (TGZ) - 158.5Kb
Man Pages (Zip) - 261.6Kb
Info (Gzip) - 2.6Mb
Info (Zip) - 2.6Mb
Excerpts from this Manual Dynamic System Variables

Many server system variables are dynamic and can be set at runtime using SET GLOBAL or SET SESSION. You can also obtain their values using SELECT. See Section 5.1.6, “Using System Variables”.

The following table shows the full list of all dynamic system variables. The last column indicates for each variable whether GLOBAL or SESSION (or both) apply. The table also lists session options that can be set with the SET statement. Section 5.1.5, “Server System Variables”, discusses these options.

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. (If you set them on the command line or in an option file, use the numeric values.) 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 ENUM columns, for which the first enumeration value corresponds to 1.

Table 5.3 Dynamic Variable Summary

Variable Name Variable Type Variable Scope
audit_log_flush boolean GLOBAL
audit_log_policy enumeration GLOBAL
audit_log_rotate_on_size integer GLOBAL
auto_increment_increment integer GLOBAL | SESSION
auto_increment_offset integer GLOBAL | SESSION
autocommit boolean GLOBAL | SESSION
automatic_sp_privileges boolean GLOBAL
big_tables boolean GLOBAL | SESSION
binlog_cache_size integer GLOBAL
binlog_direct_non_transactional_updates boolean GLOBAL | SESSION
binlog_format enumeration GLOBAL | SESSION
binlog_stmt_cache_size integer GLOBAL
bulk_insert_buffer_size integer GLOBAL | SESSION
character_set_client string GLOBAL | SESSION
character_set_connection string GLOBAL | SESSION
character_set_database string GLOBAL | SESSION
character_set_filesystem string GLOBAL | SESSION
character_set_results string GLOBAL | SESSION
character_set_server string GLOBAL | SESSION
collation_connection string GLOBAL | SESSION
collation_database string GLOBAL | SESSION
collation_server string GLOBAL | SESSION
completion_type enumeration GLOBAL | SESSION
concurrent_insert enumeration GLOBAL
connect_timeout integer GLOBAL
debug string GLOBAL | SESSION
debug_sync string SESSION
default_storage_engine enumeration GLOBAL | SESSION
default_week_format integer GLOBAL | SESSION
delay_key_write enumeration GLOBAL
delayed_insert_limit integer GLOBAL
delayed_insert_timeout integer GLOBAL
delayed_queue_size integer GLOBAL
div_precision_increment integer GLOBAL | SESSION
engine_condition_pushdown boolean GLOBAL | SESSION
event_scheduler enumeration GLOBAL
expire_logs_days integer GLOBAL
flush boolean GLOBAL
flush_time integer GLOBAL
foreign_key_checks boolean GLOBAL | SESSION
ft_boolean_syntax string GLOBAL
general_log boolean GLOBAL
general_log_file filename GLOBAL
group_concat_max_len integer GLOBAL | SESSION
identity integer SESSION
init_connect string GLOBAL
init_slave string GLOBAL
innodb_adaptive_flushing boolean GLOBAL
innodb_adaptive_hash_index boolean GLOBAL
innodb_autoextend_increment integer GLOBAL
innodb_change_buffering enumeration GLOBAL
innodb_change_buffering_debug integer GLOBAL
innodb_commit_concurrency integer GLOBAL
innodb_concurrency_tickets integer GLOBAL
innodb_fast_shutdown integer GLOBAL
innodb_file_format string GLOBAL
innodb_file_format_check boolean GLOBAL
innodb_file_format_max string GLOBAL
innodb_file_per_table boolean GLOBAL
innodb_flush_log_at_trx_commit enumeration GLOBAL
innodb_io_capacity integer GLOBAL
innodb_large_prefix boolean GLOBAL
innodb_limit_optimistic_insert_debug integer GLOBAL
innodb_lock_wait_timeout integer GLOBAL | SESSION
innodb_max_dirty_pages_pct numeric GLOBAL
innodb_max_purge_lag integer GLOBAL
innodb_old_blocks_pct integer GLOBAL
innodb_old_blocks_time integer 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_spin_wait_delay integer GLOBAL
innodb_stats_method enumeration GLOBAL
innodb_stats_on_metadata boolean GLOBAL
innodb_stats_sample_pages integer GLOBAL
innodb_strict_mode boolean GLOBAL | SESSION
innodb_support_xa boolean GLOBAL | SESSION
innodb_sync_spin_loops integer GLOBAL
innodb_table_locks boolean GLOBAL | SESSION
innodb_thread_concurrency integer GLOBAL
innodb_thread_sleep_delay integer GLOBAL
innodb_trx_purge_view_update_only_debug boolean GLOBAL
innodb_trx_rseg_n_slots_debug integer GLOBAL
insert_id integer SESSION
interactive_timeout integer GLOBAL | SESSION
join_buffer_size integer GLOBAL | SESSION
keep_files_on_create boolean GLOBAL | SESSION
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 GLOBAL | SESSION
lc_time_names string GLOBAL | SESSION
local_infile boolean GLOBAL
lock_wait_timeout integer GLOBAL | SESSION
log filename GLOBAL
log_bin_trust_function_creators boolean GLOBAL
log_bin_trust_routine_creators boolean GLOBAL
log_output set GLOBAL
log_queries_not_using_indexes boolean GLOBAL
log_slow_queries boolean GLOBAL
log_warnings integer GLOBAL | SESSION
long_query_time numeric GLOBAL | SESSION
low_priority_updates boolean GLOBAL | SESSION
max_allowed_packet integer GLOBAL | SESSION
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 GLOBAL | SESSION
max_error_count integer GLOBAL | SESSION
max_heap_table_size integer GLOBAL | SESSION
max_insert_delayed_threads integer GLOBAL | SESSION
max_join_size integer GLOBAL | SESSION
max_length_for_sort_data integer GLOBAL | SESSION
max_prepared_stmt_count integer GLOBAL
max_relay_log_size integer GLOBAL
max_seeks_for_key integer GLOBAL | SESSION
max_sort_length integer GLOBAL | SESSION
max_sp_recursion_depth integer GLOBAL | SESSION
max_tmp_tables integer GLOBAL | SESSION
max_user_connections integer GLOBAL | SESSION
max_write_lock_count integer GLOBAL
min_examined_row_limit integer GLOBAL | SESSION
multi_range_count integer GLOBAL | SESSION
myisam_data_pointer_size integer GLOBAL
myisam_max_sort_file_size integer GLOBAL
myisam_repair_threads integer GLOBAL | SESSION
myisam_sort_buffer_size integer GLOBAL | SESSION
myisam_stats_method enumeration GLOBAL | SESSION
myisam_use_mmap boolean GLOBAL
ndb_autoincrement_prefetch_sz integer GLOBAL | SESSION
ndb_blob_read_batch_bytes integer GLOBAL | SESSION
ndb_blob_write_batch_bytes integer GLOBAL | SESSION
ndb_cache_check_time integer GLOBAL
ndb_deferred_constraints integer GLOBAL | SESSION
ndb_deferred_constraints integer GLOBAL | SESSION
ndb_distribution enumeration GLOBAL
ndb_distribution={KEYHASH|LINHASH} enumeration GLOBAL
ndb_eventbuffer_max_alloc integer GLOBAL
ndb_extra_logging integer GLOBAL
ndb_force_send boolean GLOBAL | SESSION
ndb_index_stat_cache_entries integer GLOBAL | SESSION
ndb_index_stat_enable boolean GLOBAL | SESSION
ndb_index_stat_option string GLOBAL | SESSION
ndb_index_stat_update_freq integer GLOBAL | SESSION
ndb_join_pushdown boolean GLOBAL | SESSION
ndb_log_bin boolean GLOBAL | SESSION
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_update_as_write boolean GLOBAL
ndb_log_updated_only boolean GLOBAL
ndb_optimization_delay integer GLOBAL
ndb_report_thresh_binlog_epoch_slip integer GLOBAL
ndb_report_thresh_binlog_mem_usage integer GLOBAL
ndb_table_no_logging boolean SESSION
ndb_table_temporary boolean SESSION
ndb_use_exact_count boolean GLOBAL | SESSION
ndb_use_transactions boolean GLOBAL | SESSION
ndbinfo_max_bytes integer GLOBAL | SESSION
ndbinfo_max_rows integer GLOBAL | SESSION
ndbinfo_offline boolean GLOBAL
ndbinfo_show_hidden boolean GLOBAL | SESSION
ndbinfo_table_prefix string GLOBAL | SESSION
net_buffer_length integer GLOBAL | SESSION
net_read_timeout integer GLOBAL | SESSION
net_retry_count integer GLOBAL | SESSION
net_write_timeout integer GLOBAL | SESSION
new boolean GLOBAL | SESSION
old_alter_table boolean GLOBAL | SESSION
old_passwords boolean GLOBAL | SESSION
optimizer_prune_level boolean GLOBAL | SESSION
optimizer_search_depth integer GLOBAL | SESSION
optimizer_switch set GLOBAL | SESSION
preload_buffer_size integer GLOBAL | SESSION
profiling boolean GLOBAL | SESSION
profiling_history_size integer GLOBAL | SESSION
pseudo_slave_mode integer SESSION
pseudo_thread_id integer SESSION
query_alloc_block_size integer GLOBAL | SESSION
query_cache_limit integer GLOBAL
query_cache_min_res_unit integer GLOBAL
query_cache_size integer GLOBAL
query_cache_type enumeration GLOBAL | SESSION
query_cache_wlock_invalidate boolean GLOBAL | SESSION
query_prealloc_size integer GLOBAL | SESSION
rand_seed1 integer SESSION
rand_seed2 integer SESSION
range_alloc_block_size integer GLOBAL | SESSION
read_buffer_size integer GLOBAL | SESSION
read_only boolean GLOBAL
read_rnd_buffer_size integer GLOBAL | SESSION
relay_log_purge boolean GLOBAL
relay_log_recovery boolean GLOBAL
rpl_recovery_rank 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_no_slave boolean GLOBAL
rpl_semi_sync_slave_enabled boolean GLOBAL
rpl_semi_sync_slave_trace_level integer GLOBAL
secure_auth boolean GLOBAL
server_id integer GLOBAL
slave_allow_batching boolean GLOBAL
slave_compressed_protocol boolean GLOBAL
slave_exec_mode enumeration GLOBAL
slave_max_allowed_packet integer GLOBAL
slave_net_timeout integer GLOBAL
slave_transaction_retries integer GLOBAL
slow_launch_time integer GLOBAL
slow_query_log boolean GLOBAL
slow_query_log_file filename GLOBAL
sort_buffer_size integer GLOBAL | SESSION
sql_auto_is_null boolean GLOBAL | SESSION
sql_big_selects boolean GLOBAL | SESSION
sql_big_tables boolean GLOBAL | SESSION
sql_buffer_result boolean GLOBAL | SESSION
sql_log_bin boolean SESSION
sql_log_off boolean GLOBAL | SESSION
sql_log_update boolean SESSION
sql_low_priority_updates boolean GLOBAL | SESSION
sql_max_join_size integer GLOBAL | SESSION
sql_mode set GLOBAL | SESSION
sql_notes boolean GLOBAL | SESSION
sql_quote_show_create boolean GLOBAL | SESSION
sql_safe_updates boolean GLOBAL | SESSION
sql_select_limit integer GLOBAL | SESSION
sql_slave_skip_counter integer GLOBAL
sql_warnings boolean GLOBAL | SESSION
storage_engine enumeration GLOBAL | SESSION
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_lock_wait_timeout integer GLOBAL
table_open_cache integer GLOBAL
table_type enumeration GLOBAL | SESSION
thread_cache_size integer GLOBAL
thread_pool_high_priority_connection integer GLOBAL | SESSION
thread_pool_max_unused_threads integer GLOBAL
thread_pool_prio_kickup_timer integer GLOBAL | SESSION
thread_pool_stall_limit integer GLOBAL
time_zone string GLOBAL | SESSION
timed_mutexes boolean GLOBAL
timestamp numeric SESSION
tmp_table_size integer GLOBAL | SESSION
transaction_alloc_block_size integer GLOBAL | SESSION
transaction_allow_batching boolean SESSION
transaction_prealloc_size integer GLOBAL | SESSION
tx_isolation enumeration GLOBAL | SESSION
unique_checks boolean GLOBAL | SESSION
updatable_views_with_limit boolean GLOBAL | SESSION
wait_timeout integer GLOBAL | SESSION

User Comments
Sign Up Login You must be logged in to post a comment.