Chapter 5 MySQL Server Administration

Table of Contents

5.1 The MySQL Server
5.1.1 Configuring the Server
5.1.2 Server Configuration Defaults
5.1.3 Server Option, System Variable, and Status Variable Reference
5.1.4 Server System Variable Reference
5.1.5 Server Status Variable Reference
5.1.6 Server Command Options
5.1.7 Server System Variables
5.1.8 Using System Variables
5.1.9 Server Status Variables
5.1.10 Server SQL Modes
5.1.11 IPv6 Support
5.1.12 MySQL Server Time Zone Support
5.1.13 Server-Side Help Support
5.1.14 Server Response to Signals
5.1.15 The Server Shutdown Process
5.2 The MySQL Data Directory
5.3 The mysql System Database
5.4 MySQL Server Logs
5.4.1 Selecting General Query Log and Slow Query Log Output Destinations
5.4.2 The Error Log
5.4.3 The General Query Log
5.4.4 The Binary Log
5.4.5 The Slow Query Log
5.4.6 The DDL Log
5.4.7 Server Log Maintenance
5.5 MySQL Server Plugins
5.5.1 Installing and Uninstalling Plugins
5.5.2 Obtaining Server Plugin Information
5.5.3 MySQL Enterprise Thread Pool
5.6 MySQL Server User-Defined Functions
5.6.1 Installing and Uninstalling User-Defined Functions
5.6.2 Obtaining User-Defined Function Information
5.7 Running Multiple MySQL Instances on One Machine
5.7.1 Setting Up Multiple Data Directories
5.7.2 Running Multiple MySQL Instances on Windows
5.7.3 Running Multiple MySQL Instances on Unix
5.7.4 Using Client Programs in a Multiple-Server Environment
5.8 Tracing mysqld Using DTrace
5.8.1 mysqld DTrace Probe Reference

MySQL Server (mysqld) is the main program that does most of the work in a MySQL installation. This chapter provides an overview of MySQL Server and covers general server administration:

For additional information on administrative topics, see also:

5.1 The MySQL Server

mysqld is the MySQL server. The following discussion covers these MySQL server configuration topics:

  • Startup options that the server supports. You can specify these options on the command line, through configuration files, or both.

  • Server system variables. These variables reflect the current state and values of the startup options, some of which can be modified while the server is running.

  • Server status variables. These variables contain counters and statistics about runtime operation.

  • How to set the server SQL mode. This setting modifies certain aspects of SQL syntax and semantics, for example for compatibility with code from other database systems, or to control the error handling for particular situations.

  • Configuring and using IPv6 support.

  • Configuring and using time zone support.

  • Server-side help capabilities.

  • The server shutdown process. There are performance and reliability considerations depending on the type of table (transactional or nontransactional) and whether you use replication.

Note

Not all storage engines are supported by all MySQL server binaries and configurations. To find out how to determine which storage engines your MySQL server installation supports, see Section 13.7.5.17, “SHOW ENGINES Statement”.

5.1.1 Configuring the Server

The MySQL server, mysqld, has many command options and system variables that can be set at startup to configure its operation. To determine the default command option and system variable values used by the server, execute this command:

shell> mysqld --verbose --help

The command produces a list of all mysqld options and configurable system variables. Its output includes the default option and variable values and looks something like this:

allow-suspicious-udfs             FALSE
archive                           ON
auto-increment-increment          1
auto-increment-offset             1
autocommit                        TRUE
automatic-sp-privileges           TRUE
back-log                          50
basedir                           /home/jon/bin/mysql-5.5/
...
tmpdir                            /tmp
transaction-alloc-block-size      8192
transaction-isolation             REPEATABLE-READ
transaction-prealloc-size         4096
updatable-views-with-limit        YES
verbose                           TRUE
wait-timeout                      28800

To see the current system variable values actually used by the server as it runs, connect to it and execute this statement:

mysql> SHOW VARIABLES;

To see some statistical and status indicators for a running server, execute this statement:

mysql> SHOW STATUS;

System variable and status information also is available using the mysqladmin command:

shell> mysqladmin variables
shell> mysqladmin extended-status

For a full description of all command options, system variables, and status variables, see these sections:

More detailed monitoring information is available from the Performance Schema; see Chapter 22, MySQL Performance Schema.

MySQL uses algorithms that are very scalable, so you can usually run with very little memory. However, normally better performance results from giving MySQL more memory.

When tuning a MySQL server, the two most important variables to configure are key_buffer_size and table_open_cache. You should first feel confident that you have these set appropriately before trying to change any other variables.

The following examples indicate some typical variable values for different runtime configurations.

  • If you have at least 1-2GB of memory and many tables and want maximum performance with a moderate number of clients, use something like this:

    shell> mysqld_safe --key_buffer_size=384M --table_open_cache=4000 \
               --sort_buffer_size=4M --read_buffer_size=1M &
    
  • If you have only 256MB of memory and only a few tables, but you still do a lot of sorting, you can use something like this:

    shell> mysqld_safe --key_buffer_size=64M --sort_buffer_size=1M
    

    If there are very many simultaneous connections, swapping problems may occur unless mysqld has been configured to use very little memory for each connection. mysqld performs better if you have enough memory for all connections.

  • With little memory and lots of connections, use something like this:

    shell> mysqld_safe --key_buffer_size=512K --sort_buffer_size=100K \
               --read_buffer_size=100K &
    

    Or even this:

    shell> mysqld_safe --key_buffer_size=512K --sort_buffer_size=16K \
               --table_open_cache=32 --read_buffer_size=8K \
               --net_buffer_length=1K &
    

If you are performing GROUP BY or ORDER BY operations on tables that are much larger than your available memory, increase the value of read_rnd_buffer_size to speed up the reading of rows following sorting operations.

You can make use of the example option files included with your MySQL distribution; see Section 5.1.2, “Server Configuration Defaults”.

If you specify an option on the command line for mysqld or mysqld_safe, it remains in effect only for that invocation of the server. To use the option every time the server runs, put it in an option file. See Section 4.2.2.2, “Using Option Files”.

5.1.2 Server Configuration Defaults

The MySQL server has many operating parameters, which you can change at server startup using command-line options or configuration files (option files). It is also possible to change many parameters at runtime. For general instructions on setting parameters at startup or runtime, see Section 5.1.6, “Server Command Options”, and Section 5.1.7, “Server System Variables”.

MySQL provides a number of preconfigured option files that can be used as a basis for tuning the MySQL server. Look for files named my-small.cnf, my-medium.cnf, my-large.cnf, and my-huge.cnf, which are sample option files for small, medium, large, and very large systems. On Windows, the extension is .ini rather than .cnf.

Note

On Windows, the .ini or .cnf option file extension might not be displayed.

For a binary distribution, look for the sample files in or under your installation directory. If you have a source distribution, look in the support-files directory. To use a sample file as a base configuration file, rename a copy of it and place the copy in the appropriate location. Regarding names and appropriate location, see the general information provided in Section 4.2.2.2, “Using Option Files”. That section also describes option file format and syntax.

5.1.3 Server Option, System Variable, and Status Variable Reference

The following table lists all command-line options, system variables, and status variables applicable within mysqld.

The table lists command-line options (Cmd-line), options valid in configuration files (Option file), server system variables (System Var), and status variables (Status var) in one unified list, with an indication of where each option or variable is valid. If a server option set on the command line or in an option file differs from the name of the corresponding system variable, the variable name is noted immediately below the corresponding option. For system and status variables, the scope of the variable (Var Scope) is Global, Session, or both. Please see the corresponding item descriptions for details on setting and using the options and variables. Where appropriate, direct links to further information about the items are provided.

For a version of this table that is specific to NDB Cluster, see Section 18.3.2.5, “NDB Cluster mysqld Option and Variable Reference”.

Table 5.1 Command-Line Option, System Variable, and Status Variable Summary

Name Cmd-Line Option File System Var Status Var Var Scope Dynamic
abort-slave-event-count Yes Yes
Aborted_clients Yes Global No
Aborted_connects Yes Global No
allow-suspicious-udfs Yes Yes
ansi Yes Yes
audit-log Yes Yes
audit_log_buffer_size Yes Yes Yes Global No
audit_log_file Yes Yes Yes Global No
audit_log_flush Yes Global Yes
audit_log_format Yes Yes Yes Global No
audit_log_policy Yes Yes Yes Global Yes
audit_log_rotate_on_size Yes Yes Yes Global Yes
audit_log_strategy Yes Yes Yes Global No
authentication_windows_log_level Yes Yes Yes Global No
authentication_windows_use_principal_name Yes Yes Yes Global No
auto_increment_increment Yes Yes Yes Both Yes
auto_increment_offset Yes Yes Yes Both Yes
autocommit Yes Yes Yes Varies Yes
automatic_sp_privileges Yes Yes Yes Global Yes
back_log Yes Yes Yes Global No
basedir Yes Yes Yes Global No
big_tables Yes Yes Yes Varies Yes
bind-address Yes Yes
Binlog_cache_disk_use Yes Global No
binlog_cache_size Yes Yes Yes Global Yes
Binlog_cache_use Yes Global No
binlog_direct_non_transactional_updates Yes Yes Yes Both Yes
binlog-do-db Yes Yes
binlog_format Yes Yes Yes Both Yes
binlog-ignore-db Yes Yes
binlog-row-event-max-size Yes Yes
Binlog_stmt_cache_disk_use Yes Global No
binlog_stmt_cache_size Yes Yes Yes Global Yes
Binlog_stmt_cache_use Yes Global No
bootstrap Yes Yes
bulk_insert_buffer_size Yes Yes Yes Both Yes
Bytes_received Yes Both No
Bytes_sent Yes Both No
character_set_client Yes Both Yes
character-set-client-handshake Yes Yes
character_set_connection Yes Both Yes
character_set_database (note 1) Yes Both Yes
character_set_filesystem Yes Yes Yes Both Yes
character_set_results Yes Both Yes
character_set_server Yes Yes Yes Both Yes
character_set_system Yes Global No
character_sets_dir Yes Yes Yes Global No
chroot Yes Yes
collation_connection Yes Both Yes
collation_database (note 1) Yes Both Yes
collation_server Yes Yes Yes Both Yes
Com_admin_commands Yes Both No
Com_alter_db Yes Both No
Com_alter_db_upgrade Yes Both No
Com_alter_event Yes Both No
Com_alter_function Yes Both No
Com_alter_procedure Yes Both No
Com_alter_server Yes Both No
Com_alter_table Yes Both No
Com_alter_tablespace Yes Both No
Com_analyze Yes Both No
Com_assign_to_keycache Yes Both No
Com_begin Yes Both No
Com_binlog Yes Both No
Com_call_procedure Yes Both No
Com_change_db Yes Both No
Com_change_master Yes Both No
Com_check Yes Both No
Com_checksum Yes Both No
Com_commit Yes Both No
Com_create_db Yes Both No
Com_create_event Yes Both No
Com_create_function Yes Both No
Com_create_index Yes Both No
Com_create_procedure Yes Both No
Com_create_server Yes Both No
Com_create_table Yes Both No
Com_create_trigger Yes Both No
Com_create_udf Yes Both No
Com_create_user Yes Both No
Com_create_view Yes Both No
Com_dealloc_sql Yes Both No
Com_delete Yes Both No
Com_delete_multi Yes Both No
Com_do Yes Both No
Com_drop_db Yes Both No
Com_drop_event Yes Both No
Com_drop_function Yes Both No
Com_drop_index Yes Both No
Com_drop_procedure Yes Both No
Com_drop_server Yes Both No
Com_drop_table Yes Both No
Com_drop_trigger Yes Both No
Com_drop_user Yes Both No
Com_drop_view Yes Both No
Com_empty_query Yes Both No
Com_execute_sql Yes Both No
Com_flush Yes Both No
Com_grant Yes Both No
Com_ha_close Yes Both No
Com_ha_open Yes Both No
Com_ha_read Yes Both No
Com_help Yes Both No
Com_insert Yes Both No
Com_insert_select Yes Both No
Com_install_plugin Yes Both No
Com_kill Yes Both No
Com_load Yes Both No
Com_lock_tables Yes Both No
Com_optimize Yes Both No
Com_preload_keys Yes Both No
Com_prepare_sql Yes Both No
Com_purge Yes Both No
Com_purge_before_date Yes Both No
Com_release_savepoint Yes Both No
Com_rename_table Yes Both No
Com_rename_user Yes Both No
Com_repair Yes Both No
Com_replace Yes Both No
Com_replace_select Yes Both No
Com_reset Yes Both No
Com_resignal Yes Both No
Com_revoke Yes Both No
Com_revoke_all Yes Both No
Com_rollback Yes Both No
Com_rollback_to_savepoint Yes Both No
Com_savepoint Yes Both No
Com_select Yes Both No
Com_set_option Yes Both No
Com_show_authors Yes Both No
Com_show_binlog_events Yes Both No
Com_show_binlogs Yes Both No
Com_show_charsets Yes Both No
Com_show_collations Yes Both No
Com_show_contributors Yes Both No
Com_show_create_db Yes Both No
Com_show_create_event Yes Both No
Com_show_create_func Yes Both No
Com_show_create_proc Yes Both No
Com_show_create_table Yes Both No
Com_show_create_trigger Yes Both No
Com_show_databases Yes Both No
Com_show_engine_logs Yes Both No
Com_show_engine_mutex Yes Both No
Com_show_engine_status Yes Both No
Com_show_errors Yes Both No
Com_show_events Yes Both No
Com_show_fields Yes Both No
Com_show_function_code Yes Both No
Com_show_function_status Yes Both No
Com_show_grants Yes Both No
Com_show_keys Yes Both No
Com_show_master_status Yes Both No
Com_show_ndb_status Yes Both No
Com_show_new_master Yes Both No
Com_show_open_tables Yes Both No
Com_show_plugins Yes Both No
Com_show_privileges Yes Both No
Com_show_procedure_code Yes Both No
Com_show_procedure_status Yes Both No
Com_show_processlist Yes Both No
Com_show_profile Yes Both No
Com_show_profiles Yes Both No
Com_show_relaylog_events Yes Both No
Com_show_slave_hosts Yes Both No
Com_show_slave_status Yes Both No
Com_show_status Yes Both No
Com_show_storage_engines Yes Both No
Com_show_table_status Yes Both No
Com_show_tables Yes Both No
Com_show_triggers Yes Both No
Com_show_variables Yes Both No
Com_show_warnings Yes Both No
Com_signal Yes Both No
Com_slave_start Yes Both No
Com_slave_stop Yes Both No
Com_stmt_close Yes Both No
Com_stmt_execute Yes Both No
Com_stmt_fetch Yes Both No
Com_stmt_prepare Yes Both No
Com_stmt_reprepare Yes Both No
Com_stmt_reset Yes Both No
Com_stmt_send_long_data Yes Both No
Com_truncate Yes Both No
Com_uninstall_plugin Yes Both No
Com_unlock_tables Yes Both No
Com_update Yes Both No
Com_update_multi Yes Both No
Com_xa_commit Yes Both No
Com_xa_end Yes Both No
Com_xa_prepare Yes Both No
Com_xa_recover Yes Both No
Com_xa_rollback Yes Both No
Com_xa_start Yes Both No
completion_type Yes Yes Yes Both Yes
Compression Yes Session No
concurrent_insert Yes Yes Yes Global Yes
connect_timeout Yes Yes Yes Global Yes
Connections Yes Global No
console Yes Yes
core-file Yes Yes
Created_tmp_disk_tables Yes Both No
Created_tmp_files Yes Global No
Created_tmp_tables Yes Both No
datadir Yes Yes Yes Global No
date_format Yes Varies No
datetime_format Yes Varies No
debug Yes Yes Yes Both Yes
debug_sync Yes Varies Yes
debug-sync-timeout Yes Yes
default-character-set Yes Yes
default-collation Yes Yes
default_storage_engine Yes Yes Yes Both Yes
default-time-zone Yes Yes
default_week_format Yes Yes Yes Both Yes
defaults-extra-file Yes
defaults-file Yes
defaults-group-suffix Yes
delay_key_write Yes Yes Yes Global Yes
delay-key-write-for-all-tables Yes
Delayed_errors Yes Global No
delayed_insert_limit Yes Yes Yes Global Yes
Delayed_insert_threads Yes Global No
delayed_insert_timeout Yes Yes Yes Global Yes
delayed_queue_size Yes Yes Yes Global Yes
Delayed_writes Yes Global No
des-key-file Yes Yes
disconnect-slave-event-count Yes Yes
div_precision_increment Yes Yes Yes Both Yes
enable-locking Yes Yes
enable-pstack Yes Yes
engine_condition_pushdown Yes Yes Yes Both Yes
error_count Yes Session No
event_scheduler Yes Yes Yes Global Yes
exit-info Yes Yes
expire_logs_days Yes Yes Yes Global Yes
external-locking Yes Yes
- Variable: skip_external_locking
external_user Yes Session No
federated Yes Yes
flush Yes Yes Yes Global Yes
Flush_commands Yes Global No
flush_time Yes Yes Yes Global Yes
foreign_key_checks Yes Varies Yes
ft_boolean_syntax Yes Yes Yes Global Yes
ft_max_word_len Yes Yes Yes Global No
ft_min_word_len Yes Yes Yes Global No
ft_query_expansion_limit Yes Yes Yes Global No
ft_stopword_file Yes Yes Yes Global No
gdb Yes Yes
general_log Yes Yes Yes Global Yes
general_log_file Yes Yes Yes Global Yes
group_concat_max_len Yes Yes Yes Both Yes
Handler_commit Yes Both No
Handler_delete Yes Both No
Handler_discover Yes Both No
Handler_prepare Yes Both No
Handler_read_first Yes Both No
Handler_read_key Yes Both No
Handler_read_last Yes Both No
Handler_read_next Yes Both No
Handler_read_prev Yes Both No
Handler_read_rnd Yes Both No
Handler_read_rnd_next Yes Both No
Handler_rollback Yes Both No
Handler_savepoint Yes Both No
Handler_savepoint_rollback Yes Both No
Handler_update Yes Both No
Handler_write Yes Both No
have_compress Yes Global No
have_crypt Yes Global No
have_csv Yes Global No
have_dynamic_loading Yes Global No
have_geometry Yes Global No
have_innodb Yes Global No
have_ndbcluster Yes Global No
have_openssl Yes Global No
have_partitioning Yes Global No
have_profiling Yes Global No
have_query_cache Yes Global No
have_rtree_keys Yes Global No
have_ssl Yes Global No
have_symlink Yes Global No
help Yes Yes
hostname Yes Global No
identity Yes Session Yes
ignore_builtin_innodb Yes Yes Yes Global No
init_connect Yes Yes Yes Global Yes
init_file Yes Yes Yes Global No
init_slave Yes Yes Yes Global Yes
innodb Yes Yes
innodb_adaptive_flushing Yes Yes Yes Global Yes
innodb_adaptive_hash_index Yes Yes Yes Global Yes
innodb_additional_mem_pool_size Yes Yes Yes Global No
innodb_autoextend_increment Yes Yes Yes Global Yes
innodb_autoinc_lock_mode Yes Yes Yes Global No
Innodb_buffer_pool_bytes_data Yes Global No
Innodb_buffer_pool_bytes_dirty Yes Global No
innodb_buffer_pool_instances Yes Yes Yes Global No
Innodb_buffer_pool_pages_data Yes Global No
Innodb_buffer_pool_pages_dirty Yes Global No
Innodb_buffer_pool_pages_flushed Yes Global No
Innodb_buffer_pool_pages_free Yes Global No
Innodb_buffer_pool_pages_latched Yes Global No
Innodb_buffer_pool_pages_misc Yes Global No
Innodb_buffer_pool_pages_total Yes Global No
Innodb_buffer_pool_read_ahead Yes Global No
Innodb_buffer_pool_read_ahead_evicted Yes Global No
Innodb_buffer_pool_read_ahead_rnd Yes Global No
Innodb_buffer_pool_read_requests Yes Global No
Innodb_buffer_pool_reads Yes Global No
innodb_buffer_pool_size Yes Yes Yes Global No
Innodb_buffer_pool_wait_free Yes Global No
Innodb_buffer_pool_write_requests Yes Global No
innodb_change_buffering Yes Yes Yes Global Yes
innodb_change_buffering_debug Yes Yes Yes Global Yes
innodb_checksums Yes Yes Yes Global No
innodb_commit_concurrency Yes Yes Yes Global Yes
innodb_concurrency_tickets Yes Yes Yes Global Yes
innodb_data_file_path Yes Yes Yes Global No
Innodb_data_fsyncs Yes Global No
innodb_data_home_dir Yes Yes Yes Global No
Innodb_data_pending_fsyncs Yes Global No
Innodb_data_pending_reads Yes Global No
Innodb_data_pending_writes Yes Global No
Innodb_data_read Yes Global No
Innodb_data_reads Yes Global No
Innodb_data_writes Yes Global No
Innodb_data_written Yes Global No
Innodb_dblwr_pages_written Yes Global No
Innodb_dblwr_writes Yes Global No
innodb_doublewrite Yes Yes Yes Global No
innodb_fast_shutdown Yes Yes Yes Global Yes
innodb_file_format Yes Yes Yes Global Yes
innodb_file_format_check Yes Yes Yes Global Varies
innodb_file_format_max Yes Yes Yes Global Yes
innodb_file_per_table Yes Yes Yes Global Yes
innodb_flush_log_at_trx_commit Yes Yes Yes Global Yes
innodb_flush_method Yes Yes Yes Global No
innodb_force_load_corrupted Yes Yes Yes Global No
innodb_force_recovery Yes Yes Yes Global No
Innodb_have_atomic_builtins Yes Global No
innodb_io_capacity Yes Yes Yes Global Yes
innodb_large_prefix Yes Yes Yes Global Yes
innodb_limit_optimistic_insert_debug Yes Yes Yes Global Yes
innodb_lock_wait_timeout Yes Yes Yes Both Yes
innodb_locks_unsafe_for_binlog Yes Yes Yes Global No
innodb_log_buffer_size Yes Yes Yes Global No
innodb_log_file_size Yes Yes Yes Global No
innodb_log_files_in_group Yes Yes Yes Global No
innodb_log_group_home_dir Yes Yes Yes Global No
Innodb_log_waits Yes Global No
Innodb_log_write_requests Yes Global No
Innodb_log_writes Yes Global No
innodb_max_dirty_pages_pct Yes Yes Yes Global Yes
innodb_max_purge_lag Yes Yes Yes Global Yes
innodb_mirrored_log_groups Yes Yes Yes Global No
innodb_old_blocks_pct Yes Yes Yes Global Yes
innodb_old_blocks_time Yes Yes Yes Global Yes
innodb_open_files Yes Yes Yes Global No
Innodb_os_log_fsyncs Yes Global No
Innodb_os_log_pending_fsyncs Yes Global No
Innodb_os_log_pending_writes Yes Global No
Innodb_os_log_written Yes Global No
Innodb_page_size Yes Global No
Innodb_pages_created Yes Global No
Innodb_pages_read Yes Global No
Innodb_pages_written Yes Global No
innodb_print_all_deadlocks Yes Yes Yes Global Yes
innodb_purge_batch_size Yes Yes Yes Global Yes
innodb_purge_threads Yes Yes Yes Global No
innodb_random_read_ahead Yes Yes Yes Global Yes
innodb_read_ahead_threshold Yes Yes Yes Global Yes
innodb_read_io_threads Yes Yes Yes Global No
innodb_replication_delay Yes Yes Yes Global Yes
innodb_rollback_on_timeout Yes Yes Yes Global No
innodb_rollback_segments Yes Yes Yes Global Yes
Innodb_row_lock_current_waits Yes Global No
Innodb_row_lock_time Yes Global No
Innodb_row_lock_time_avg Yes Global No
Innodb_row_lock_time_max Yes Global No
Innodb_row_lock_waits Yes Global No
Innodb_rows_deleted Yes Global No
Innodb_rows_inserted Yes Global No
Innodb_rows_read Yes Global No
Innodb_rows_updated Yes Global No
innodb_spin_wait_delay Yes Yes Yes Global Yes
innodb_stats_method Yes Yes Yes Global Yes
innodb_stats_on_metadata Yes Yes Yes Global Yes
innodb_stats_sample_pages Yes Yes Yes Global Yes
innodb-status-file Yes Yes
innodb_strict_mode Yes Yes Yes Both Yes
innodb_support_xa Yes Yes Yes Both Yes
innodb_sync_spin_loops Yes Yes Yes Global Yes
innodb_table_locks Yes Yes Yes Both Yes
innodb_thread_concurrency Yes Yes Yes Global Yes
innodb_thread_sleep_delay Yes Yes Yes Global Yes
Innodb_truncated_status_writes Yes Global No
innodb_trx_purge_view_update_only_debug Yes Yes Yes Global Yes
innodb_trx_rseg_n_slots_debug Yes Yes Yes Global Yes
innodb_use_native_aio Yes Yes Yes Global No
innodb_use_sys_malloc Yes Yes Yes Global No
innodb_version Yes Global No
innodb_write_io_threads Yes Yes Yes Global No
insert_id Yes Session Yes
install Yes
install-manual Yes
interactive_timeout Yes Yes Yes Both Yes
join_buffer_size Yes Yes Yes Both Yes
keep_files_on_create Yes Yes Yes Both Yes
Key_blocks_not_flushed Yes Global No
Key_blocks_unused Yes Global No
Key_blocks_used Yes Global No
key_buffer_size Yes Yes Yes Global Yes
key_cache_age_threshold Yes Yes Yes Global Yes
key_cache_block_size Yes Yes Yes Global Yes
key_cache_division_limit Yes Yes Yes Global Yes
Key_read_requests Yes Global No
Key_reads Yes Global No
Key_write_requests Yes Global No
Key_writes Yes Global No
language Yes Yes Yes Global No
large_files_support Yes Global No
large_page_size Yes Global No
large-pages Yes Yes Yes Global No
last_insert_id Yes Session Yes
Last_query_cost Yes Session No
lc-messages Yes Yes Yes Both Yes
lc-messages-dir Yes Yes Yes Global No
lc_time_names Yes Yes Yes Both Yes
license Yes Global No
local_infile Yes Yes Yes Global Yes
local-service Yes
lock_wait_timeout Yes Yes Yes Both Yes
locked_in_memory Yes Global No
log Yes Yes Yes Global Yes
log-bin Yes Yes
log_bin Yes Global No
log-bin-index Yes Yes
log_bin_trust_function_creators Yes Yes Yes Global Yes
log_bin_trust_routine_creators Yes Yes Yes Global Yes
log_bin_use_v1_row_events Yes Yes Yes Global No
log-error Yes Yes Yes Global No
log-isam Yes Yes
log_output Yes Yes Yes Global Yes
log_queries_not_using_indexes Yes Yes Yes Global Yes
log-short-format Yes Yes
log_slave_updates Yes Yes Yes Global No
log-slow-admin-statements Yes Yes
log_slow_queries Yes Yes Yes Global Yes
log-slow-slave-statements Yes Yes
log-tc Yes Yes
log-tc-size Yes Yes
log-warnings Yes Yes Yes Both Yes
long_query_time Yes Yes Yes Both Yes
low_priority_updates Yes Yes Yes Both Yes
lower_case_file_system Yes Global No
lower_case_table_names Yes Yes Yes Global No
master-connect-retry Yes Yes
master-host Yes Yes
master-info-file Yes Yes
master-password Yes Yes
master-port Yes Yes
master-retry-count Yes Yes
master-ssl Yes Yes
master-ssl-ca Yes Yes
master-ssl-capath Yes Yes
master-ssl-cert Yes Yes
master-ssl-cipher Yes Yes
master-ssl-key Yes Yes
master-user Yes Yes
max_allowed_packet Yes Yes Yes Both Yes
max_binlog_cache_size Yes Yes Yes Global Yes
max-binlog-dump-events Yes Yes
max_binlog_size Yes Yes Yes Global Yes
max_binlog_stmt_cache_size Yes Yes Yes Global Yes
max_connect_errors Yes Yes Yes Global Yes
max_connections Yes Yes Yes Global Yes
max_delayed_threads Yes Yes Yes Both Yes
max_error_count Yes Yes Yes Both Yes
max_heap_table_size Yes Yes Yes Both Yes
max_insert_delayed_threads Yes Both Yes
max_join_size Yes Yes Yes Both Yes
max_length_for_sort_data Yes Yes Yes Both Yes
max_long_data_size Yes Yes Yes Global No
max_prepared_stmt_count Yes Yes Yes Global Yes
max_relay_log_size Yes Yes Yes Global Yes
max_seeks_for_key Yes Yes Yes Both Yes
max_sort_length Yes Yes Yes Both Yes
max_sp_recursion_depth Yes Yes Yes Both Yes
max_tmp_tables Yes Both Yes
Max_used_connections Yes Global No
max_user_connections Yes Yes Yes Both Yes
max_write_lock_count Yes Yes Yes Global Yes
memlock Yes Yes
- Variable: locked_in_memory
metadata_locks_cache_size Yes Yes Yes Global No
min_examined_row_limit Yes Yes Yes Both Yes
multi_range_count Yes Yes Yes Both Yes
myisam-block-size Yes Yes
myisam_data_pointer_size Yes Yes Yes Global Yes
myisam_max_sort_file_size Yes Yes Yes Global Yes
myisam_mmap_size Yes Yes Yes Global No
myisam-recover Yes Yes
- Variable: myisam_recover_options
myisam_recover_options Yes Yes Yes Global No
myisam_repair_threads Yes Yes Yes Both Yes
myisam_sort_buffer_size Yes Yes Yes Both Yes
myisam_stats_method Yes Yes Yes Both Yes
myisam_use_mmap Yes Yes Yes Global Yes
named_pipe Yes Yes Yes Global No
Ndb_api_bytes_received_count Yes Global No
Ndb_api_bytes_received_count_session Yes Session No
Ndb_api_bytes_received_count_slave Yes Global No
Ndb_api_bytes_sent_count Yes Global No
Ndb_api_bytes_sent_count_session Yes Session No
Ndb_api_bytes_sent_count_slave Yes Global No
Ndb_api_event_bytes_count Yes Global No
Ndb_api_event_bytes_count_injector Yes Global No
Ndb_api_event_data_count Yes Global No
Ndb_api_event_data_count_injector Yes Global No
Ndb_api_event_nondata_count Yes Global No
Ndb_api_event_nondata_count_injector Yes Global No
Ndb_api_pk_op_count Yes Global No
Ndb_api_pk_op_count_session Yes Session No
Ndb_api_pk_op_count_slave Yes Global No
Ndb_api_pruned_scan_count Yes Global No
Ndb_api_pruned_scan_count_session Yes Session No
Ndb_api_pruned_scan_count_slave Yes Global No
Ndb_api_range_scan_count Yes Global No
Ndb_api_range_scan_count_session Yes Session No
Ndb_api_range_scan_count_slave Yes Global No
Ndb_api_read_row_count Yes Global No
Ndb_api_read_row_count_session Yes Session No
Ndb_api_read_row_count_slave Yes Global No
Ndb_api_scan_batch_count Yes Global No
Ndb_api_scan_batch_count_session Yes Session No
Ndb_api_scan_batch_count_slave Yes Global No
Ndb_api_table_scan_count Yes Global No
Ndb_api_table_scan_count_session Yes Session No
Ndb_api_table_scan_count_slave Yes Global No
Ndb_api_trans_abort_count Yes Global No
Ndb_api_trans_abort_count_session Yes Session No
Ndb_api_trans_abort_count_slave Yes Global No
Ndb_api_trans_close_count Yes Global No
Ndb_api_trans_close_count_session Yes Session No
Ndb_api_trans_close_count_slave Yes Global No
Ndb_api_trans_commit_count Yes Global No
Ndb_api_trans_commit_count_session Yes Session No
Ndb_api_trans_commit_count_slave Yes Global No
Ndb_api_trans_local_read_row_count Yes Global No
Ndb_api_trans_local_read_row_count_session Yes Session No
Ndb_api_trans_local_read_row_count_slave Yes Global No
Ndb_api_trans_start_count Yes Global No
Ndb_api_trans_start_count_session Yes Session No
Ndb_api_trans_start_count_slave Yes Global No
Ndb_api_uk_op_count Yes Global No
Ndb_api_uk_op_count_session Yes Session No
Ndb_api_uk_op_count_slave Yes Global No
Ndb_api_wait_exec_complete_count Yes Global No
Ndb_api_wait_exec_complete_count_session Yes Session No
Ndb_api_wait_exec_complete_count_slave Yes Global No
Ndb_api_wait_meta_request_count Yes Global No
Ndb_api_wait_meta_request_count_session Yes Session No
Ndb_api_wait_meta_request_count_slave Yes Global No
Ndb_api_wait_nanos_count Yes Global No
Ndb_api_wait_nanos_count_session Yes Session No
Ndb_api_wait_nanos_count_slave Yes Global No
Ndb_api_wait_scan_result_count Yes Global No
Ndb_api_wait_scan_result_count_session Yes Session No
Ndb_api_wait_scan_result_count_slave Yes Global No
ndb_autoincrement_prefetch_sz Yes Yes Yes Both Yes
ndb-batch-size Yes Yes Global No
- Variable: ndb_batch_size Yes Global No
ndb-blob-read-batch-bytes Yes Yes Both Yes
- Variable: ndb_blob_read_batch_bytes Yes Both Yes
ndb-blob-write-batch-bytes Yes Yes Both Yes
- Variable: ndb_blob_write_batch_bytes Yes Both Yes
ndb_cache_check_time Yes Yes Yes Global Yes
ndb-cluster-connection-pool Yes Yes Yes Global No
Ndb_cluster_node_id Yes Global No
Ndb_config_from_host Yes Both No
Ndb_config_from_port Yes Both No
Ndb_conflict_fn_epoch Yes Global No
Ndb_conflict_fn_epoch_trans Yes Global No
Ndb_conflict_fn_max Yes Global No
Ndb_conflict_fn_old Yes Global No
Ndb_conflict_trans_conflict_commit_count Yes Global No
Ndb_conflict_trans_detect_iter_count Yes Global No
Ndb_conflict_trans_reject_count Yes Global No
Ndb_conflict_trans_row_reject_count Yes Global No
ndb-connectstring Yes Yes
ndb-deferred-constraints Yes Yes Both Yes
- Variable: ndb_deferred_constraints Yes Both Yes
ndb_deferred_constraints Yes Yes Yes Both Yes
ndb-distribution Yes Yes Global Yes
- Variable: ndb_distribution Yes Global Yes
ndb_distribution Yes Yes Yes Global Yes
ndb_eventbuffer_max_alloc Yes Yes Yes Global Yes
Ndb_execute_count Yes Global No
ndb_extra_logging Yes Yes Yes Global Yes
ndb_force_send Yes Yes Yes Both Yes
ndb_index_stat_cache_entries Yes Yes Yes Both Yes
ndb_index_stat_enable Yes Yes Yes Both Yes
ndb_index_stat_option Yes Yes Yes Both Yes
ndb_index_stat_update_freq Yes Yes Yes Both Yes
ndb_join_pushdown Yes Both Yes
ndb-log-apply-status Yes Yes Global No
- Variable: ndb_log_apply_status Yes Global No
ndb_log_apply_status Yes Yes Yes Global No
ndb_log_bin Yes Yes Both Yes
ndb_log_binlog_index Yes Yes Global Yes
ndb-log-empty-epochs Yes Yes Global Yes
- Variable: ndb_log_empty_epochs Yes Global Yes
ndb_log_empty_epochs Yes Yes Yes Global Yes
ndb-log-empty-update Yes Yes Global Yes
- Variable: ndb_log_empty_update Yes Global Yes
ndb_log_empty_update Yes Yes Yes Global Yes
ndb-log-orig Yes Yes Global No
- Variable: ndb_log_orig Yes Global No
ndb_log_orig Yes Yes Yes Global No
ndb-log-transaction-id Yes Yes Global No
- Variable: ndb_log_transaction_id Yes Global No
ndb_log_transaction_id Yes Global No
ndb-log-update-as-write Yes Yes Global Yes
- Variable: ndb_log_update_as_write Yes Global Yes
ndb_log_updated_only Yes Yes Yes Global Yes
ndb-mgmd-host Yes Yes
ndb-nodeid Yes Yes Yes Global No
Ndb_number_of_data_nodes Yes Global No
ndb-optimization-delay Yes Yes Global Yes
- Variable: ndb_optimization_delay Yes Global Yes
ndb_optimized_node_selection Yes Yes Yes Global No
Ndb_pruned_scan_count Yes Global No
Ndb_pushed_queries_defined Yes Global No
Ndb_pushed_queries_dropped Yes Global No
Ndb_pushed_queries_executed Yes Global No
Ndb_pushed_reads Yes Global No
ndb_report_thresh_binlog_epoch_slip Yes Yes Yes Global Yes
ndb_report_thresh_binlog_mem_usage Yes Yes Yes Global Yes
Ndb_scan_count Yes Global No
ndb_table_no_logging Yes Session Yes
ndb_table_temporary Yes Session Yes
ndb-transid-mysql-connection-map Yes
ndb_use_copying_alter_table Yes Both No
ndb_use_exact_count Yes Both Yes
ndb_use_transactions Yes Yes Yes Both Yes
ndb_version Yes Global No
ndb_version_string Yes Global No
ndb-wait-connected Yes Yes Yes Global No
ndb-wait-setup Yes Yes Yes Global No
ndbcluster Yes Yes
- Variable: have_ndbcluster
ndbinfo_database Yes Global No
ndbinfo_max_bytes Yes Yes Both Yes
ndbinfo_max_rows Yes Yes Both Yes
ndbinfo_offline Yes Global Yes
ndbinfo_show_hidden Yes Yes Both Yes
ndbinfo_table_prefix Yes Yes Both Yes
ndbinfo_version Yes Global No
net_buffer_length Yes Yes Yes Both Yes
net_read_timeout Yes Yes Yes Both Yes
net_retry_count Yes Yes Yes Both Yes
net_write_timeout Yes Yes Yes Both Yes
new Yes Yes Yes Both Yes
no-defaults Yes
Not_flushed_delayed_rows Yes Global No
old Yes Yes Yes Global No
old_alter_table Yes Yes Yes Both Yes
old_passwords Yes Yes Yes Both Yes
old-style-user-limits Yes Yes
one-thread Yes Yes
Open_files Yes Global No
open_files_limit Yes Yes Yes Global No
Open_streams Yes Global No
Open_table_definitions Yes Global No
Open_tables Yes Both No
Opened_files Yes Global No
Opened_table_definitions Yes Both No
Opened_tables Yes Both No
optimizer_prune_level Yes Yes Yes Both Yes
optimizer_search_depth Yes Yes Yes Both Yes
optimizer_switch Yes Yes Yes Both Yes
partition Yes Yes
- Variable: have_partitioning
performance_schema Yes Yes Yes Global No
Performance_schema_cond_classes_lost Yes Global No
Performance_schema_cond_instances_lost Yes Global No
performance_schema_events_waits_history_long_size Yes Yes Yes Global No
performance_schema_events_waits_history_size Yes Yes Yes Global No
Performance_schema_file_classes_lost Yes Global No
Performance_schema_file_handles_lost Yes Global No
Performance_schema_file_instances_lost Yes Global No
Performance_schema_locker_lost Yes Global No
performance_schema_max_cond_classes Yes Yes Yes Global No
performance_schema_max_cond_instances Yes Yes Yes Global No
performance_schema_max_file_classes Yes Yes Yes Global No
performance_schema_max_file_handles Yes Yes Yes Global No
performance_schema_max_file_instances Yes Yes Yes Global No
performance_schema_max_mutex_classes Yes Yes Yes Global No
performance_schema_max_mutex_instances Yes Yes Yes Global No
performance_schema_max_rwlock_classes Yes Yes Yes Global No
performance_schema_max_rwlock_instances Yes Yes Yes Global No
performance_schema_max_table_handles Yes Yes Yes Global No
performance_schema_max_table_instances Yes Yes Yes Global No
performance_schema_max_thread_classes Yes Yes Yes Global No
performance_schema_max_thread_instances Yes Yes Yes Global No
Performance_schema_mutex_classes_lost Yes Global No
Performance_schema_mutex_instances_lost Yes Global No
Performance_schema_rwlock_classes_lost Yes Global No
Performance_schema_rwlock_instances_lost Yes Global No
Performance_schema_table_handles_lost Yes Global No
Performance_schema_table_instances_lost Yes Global No
Performance_schema_thread_classes_lost Yes Global No
Performance_schema_thread_instances_lost Yes Global No
pid_file Yes Yes Yes Global No
plugin_dir Yes Yes Yes Global No
plugin-load Yes Yes Yes Global No
plugin-xxx Yes Yes
port Yes Yes Yes Global No
port-open-timeout Yes Yes
preload_buffer_size Yes Yes Yes Both Yes
Prepared_stmt_count Yes Global No
print-defaults Yes
profiling Yes Varies Yes
profiling_history_size Yes Yes Yes Both Yes
protocol_version Yes Global No
proxy_user Yes Session No
pseudo_slave_mode Yes Session Yes
pseudo_thread_id Yes Session Yes
Qcache_free_blocks Yes Global No
Qcache_free_memory Yes Global No
Qcache_hits Yes Global No
Qcache_inserts Yes Global No
Qcache_lowmem_prunes Yes Global No
Qcache_not_cached Yes Global No
Qcache_queries_in_cache Yes Global No
Qcache_total_blocks Yes Global No
Queries Yes Both No
query_alloc_block_size Yes Yes Yes Both Yes
query_cache_limit Yes Yes Yes Global Yes
query_cache_min_res_unit Yes Yes Yes Global Yes
query_cache_size Yes Yes Yes Global Yes
query_cache_type Yes Yes Yes Both Yes
query_cache_wlock_invalidate Yes Yes Yes Both Yes
query_prealloc_size Yes Yes Yes Both Yes
Questions Yes Both No
rand_seed1 Yes Session Yes
rand_seed2 Yes Session Yes
range_alloc_block_size Yes Yes Yes Both Yes
read_buffer_size Yes Yes Yes Both Yes
read_only Yes Yes Yes Global Yes
read_rnd_buffer_size Yes Yes Yes Both Yes
relay_log Yes Yes Yes Global No
relay_log_index Yes Yes Yes Global No
relay_log_info_file Yes Yes Yes Global No
relay_log_purge Yes Yes Yes Global Yes
relay_log_recovery Yes Yes Yes Global Yes
relay_log_space_limit Yes Yes Yes Global No
remove Yes
replicate-do-db Yes Yes
replicate-do-table Yes Yes
replicate-ignore-db Yes Yes
replicate-ignore-table Yes Yes
replicate-rewrite-db Yes Yes
replicate-same-server-id Yes Yes
replicate-wild-do-table Yes Yes
replicate-wild-ignore-table Yes Yes
report_host Yes Yes Yes Global No
report_password Yes Yes Yes Global No
report_port Yes Yes Yes Global No
report_user Yes Yes Yes Global No
rpl_recovery_rank Yes Global Yes
Rpl_semi_sync_master_clients Yes Global No
rpl_semi_sync_master_enabled Yes Yes Yes Global Yes
Rpl_semi_sync_master_net_avg_wait_time Yes Global No
Rpl_semi_sync_master_net_wait_time Yes Global No
Rpl_semi_sync_master_net_waits Yes Global No
Rpl_semi_sync_master_no_times Yes Global No
Rpl_semi_sync_master_no_tx Yes Global No
Rpl_semi_sync_master_status Yes Global No
Rpl_semi_sync_master_timefunc_failures Yes Global No
rpl_semi_sync_master_timeout Yes Yes Yes Global Yes
rpl_semi_sync_master_trace_level Yes Yes Yes Global Yes
Rpl_semi_sync_master_tx_avg_wait_time Yes Global No
Rpl_semi_sync_master_tx_wait_time Yes Global No
Rpl_semi_sync_master_tx_waits Yes Global No
rpl_semi_sync_master_wait_no_slave Yes Yes Yes Global Yes
Rpl_semi_sync_master_wait_pos_backtraverse Yes Global No
Rpl_semi_sync_master_wait_sessions Yes Global No
Rpl_semi_sync_master_yes_tx Yes Global No
rpl_semi_sync_slave_enabled Yes Yes Yes Global Yes
Rpl_semi_sync_slave_status Yes Global No
rpl_semi_sync_slave_trace_level Yes Yes Yes Global Yes
Rpl_status Yes Global No
safe-mode Yes Yes
safe-show-database Yes Yes
safe-user-create Yes Yes
safemalloc-mem-limit Yes Yes
secure_auth Yes Yes Yes Global Yes
secure_file_priv Yes Yes Yes Global No
Select_full_join Yes Both No
Select_full_range_join Yes Both No
Select_range Yes Both No
Select_range_check Yes Both No
Select_scan Yes Both No
server_id Yes Yes Yes Global Yes
server_id_bits Yes Yes Yes Global No
set-variable Yes Yes
shared_memory Yes Yes Yes Global No
shared_memory_base_name Yes Yes Yes Global No
show-slave-auth-info Yes Yes
skip-character-set-client-handshake Yes Yes
skip_external_locking Yes Yes Yes Global No
skip-grant-tables Yes Yes
skip-host-cache Yes Yes
skip-locking Yes Yes
skip_name_resolve Yes Yes Yes Global No
skip-ndbcluster Yes Yes
skip_networking Yes Yes Yes Global No
skip-new Yes Yes
skip-partition Yes Yes
skip-safemalloc Yes Yes
skip-show-database Yes Yes Yes Global No
skip-slave-start Yes Yes
skip-ssl Yes Yes
skip-stack-trace Yes Yes
skip-symlink Yes Yes
skip-thread-priority Yes Yes
slave_allow_batching Yes Yes Yes Global Yes
slave_compressed_protocol Yes Yes Yes Global Yes
slave_exec_mode Yes Yes Yes Global Yes
Slave_heartbeat_period Yes Global No
slave_load_tmpdir Yes Yes Yes Global No
slave_max_allowed_packet Yes Yes Yes Global Yes
slave_net_timeout Yes Yes Yes Global Yes
Slave_open_temp_tables Yes Global No
Slave_received_heartbeats Yes Global No
Slave_retried_transactions Yes Global No
Slave_running Yes Global No
slave-skip-errors Yes Yes Yes Global No
slave_transaction_retries Yes Yes Yes Global Yes
slave_type_conversions Yes Yes Yes Global No
Slow_launch_threads Yes Both No
slow_launch_time Yes Yes Yes Global Yes
Slow_queries Yes Both No
slow_query_log Yes Yes Yes Global Yes
slow_query_log_file Yes Yes Yes Global Yes
slow-start-timeout Yes Yes
socket Yes Yes Yes Global No
sort_buffer_size Yes Yes Yes Both Yes
Sort_merge_passes Yes Both No
Sort_range Yes Both No
Sort_rows Yes Both No
Sort_scan Yes Both No
sporadic-binlog-dump-fail Yes Yes
sql_auto_is_null Yes Varies Yes
sql_big_selects Yes Varies Yes
sql_big_tables Yes Varies Yes
sql_buffer_result Yes Varies Yes
sql_log_bin Yes Varies Yes
sql_log_off Yes Varies Yes
sql_log_update Yes Session Yes
sql_low_priority_updates Yes Both Yes
sql_max_join_size Yes Both Yes
sql-mode Yes Yes Yes Both Yes
sql_notes Yes Varies Yes
sql_quote_show_create Yes Varies Yes
sql_safe_updates Yes Varies Yes
sql_select_limit Yes Both Yes
sql_slave_skip_counter Yes Global Yes
sql_warnings Yes Varies Yes
ssl Yes Yes
Ssl_accept_renegotiates Yes Global No
Ssl_accepts Yes Global No
ssl-ca Yes Yes Yes Global No
Ssl_callback_cache_hits Yes Global No
ssl-capath Yes Yes Yes Global No
ssl-cert Yes Yes Yes Global No
Ssl_cipher Yes Both No
ssl-cipher Yes Yes Yes Global No
Ssl_cipher_list Yes Both No
Ssl_client_connects Yes Global No
Ssl_connect_renegotiates Yes Global No
Ssl_ctx_verify_depth Yes Global No
Ssl_ctx_verify_mode Yes Global No
Ssl_default_timeout Yes Both No
Ssl_finished_accepts Yes Global No
Ssl_finished_connects Yes Global No
ssl-key Yes Yes Yes Global No
Ssl_session_cache_hits Yes Global No
Ssl_session_cache_misses Yes Global No
Ssl_session_cache_mode Yes Global No
Ssl_session_cache_overflows Yes Global No
Ssl_session_cache_size Yes Global No
Ssl_session_cache_timeouts Yes Global No
Ssl_sessions_reused Yes Both No
Ssl_used_session_cache_entries Yes Global No
Ssl_verify_depth Yes Both No
Ssl_verify_mode Yes Both No
Ssl_version Yes Both No
standalone Yes Yes
storage_engine Yes Both Yes
stored_program_cache Yes Yes Yes Global Yes
super-large-pages Yes Yes
symbolic-links Yes Yes
sync_binlog Yes Yes Yes Global Yes
sync_frm Yes Yes Yes Global Yes
sync_master_info Yes Yes Yes Global Yes
sync_relay_log Yes Yes Yes Global Yes
sync_relay_log_info Yes Yes Yes Global Yes
sysdate-is-now Yes Yes
system_time_zone Yes Global No
table_definition_cache Yes Yes Yes Global Yes
table_lock_wait_timeout Yes Yes Yes Global Yes
Table_locks_immediate Yes Global No
Table_locks_waited Yes Global No
table_open_cache Yes Yes Yes Global Yes
table_type Yes Both Yes
tc-heuristic-recover Yes Yes
Tc_log_max_pages_used Yes Global No
Tc_log_page_size Yes Global No
Tc_log_page_waits Yes Global No
temp-pool Yes Yes
thread_cache_size Yes Yes Yes Global Yes
thread_concurrency Yes Yes Yes Global No
thread_handling Yes Yes Yes Global No
thread_pool_algorithm Yes Yes Yes Global No
thread_pool_high_priority_connection Yes Yes Yes Both Yes
thread_pool_max_unused_threads Yes Yes Yes Global Yes
thread_pool_prio_kickup_timer Yes Yes Yes Both Yes
thread_pool_size Yes Yes Yes Global No
thread_pool_stall_limit Yes Yes Yes Global Yes
thread_stack Yes Yes Yes Global No
Threads_cached Yes Global No
Threads_connected Yes Global No
Threads_created Yes Global No
Threads_running Yes Global No
time_format Yes Varies No
time_zone Yes Both Yes
timed_mutexes Yes Yes Yes Global Yes
timestamp Yes Session Yes
tmp_table_size Yes Yes Yes Both Yes
tmpdir Yes Yes Yes Global No
transaction_alloc_block_size Yes Yes Yes Both Yes
transaction_allow_batching Yes Session Yes
transaction-isolation Yes Yes
- Variable: tx_isolation
transaction_prealloc_size Yes Yes Yes Both Yes
tx_isolation Yes Both Yes
unique_checks Yes Varies Yes
updatable_views_with_limit Yes Yes Yes Both Yes
Uptime Yes Global No
Uptime_since_flush_status Yes Global No
use-symbolic-links Yes Yes
user Yes Yes
verbose Yes Yes
version Yes Global No
version_comment Yes Global No
version_compile_machine Yes Global No
version_compile_os Yes Global No
wait_timeout Yes Yes Yes Both Yes
warning_count Yes Session No
warnings Yes Yes

Notes:

1. This option is dynamic, but only the server should set this information. You should not set the value of this variable manually.

5.1.4 Server System Variable Reference

The following table lists all system variables applicable within mysqld.

The table lists command-line options (Cmd-line), options valid in configuration files (Option file), server system variables (System Var), and status variables (Status var) in one unified list, with an indication of where each option or variable is valid. If a server option set on the command line or in an option file differs from the name of the corresponding system variable, the variable name is noted immediately below the corresponding option. The scope of the variable (Var Scope) 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.

Table 5.2 System Variable Summary

Name Cmd-Line Option File System Var Var Scope Dynamic
audit_log_buffer_size Yes Yes Yes Global No
audit_log_file Yes Yes Yes Global No
audit_log_flush Yes Global Yes
audit_log_format Yes Yes Yes Global No
audit_log_policy Yes Yes Yes Global Yes
audit_log_rotate_on_size Yes Yes Yes Global Yes
audit_log_strategy Yes Yes Yes Global No
authentication_windows_log_level Yes Yes Yes Global No
authentication_windows_use_principal_name Yes Yes Yes Global No
auto_increment_increment Yes Yes Yes Both Yes
auto_increment_offset Yes Yes Yes Both Yes
autocommit Yes Yes Yes Varies Yes
automatic_sp_privileges Yes Yes Yes Global Yes
back_log Yes Yes Yes Global No
basedir Yes Yes Yes Global No
big_tables Yes Yes Yes Varies Yes
binlog_cache_size Yes Yes Yes Global Yes
binlog_direct_non_transactional_updates Yes Yes Yes Both Yes
binlog_format Yes Yes Yes Both Yes
binlog_stmt_cache_size Yes Yes Yes Global Yes
bulk_insert_buffer_size Yes Yes Yes Both Yes
character_set_client Yes Both Yes
character_set_connection Yes Both Yes
character_set_database (note 1) Yes Both Yes
character_set_filesystem Yes Yes Yes Both Yes
character_set_results Yes Both Yes
character_set_server Yes Yes Yes Both Yes
character_set_system Yes Global No
character_sets_dir Yes Yes Yes Global No
collation_connection Yes Both Yes
collation_database (note 1) Yes Both Yes
collation_server Yes Yes Yes Both Yes
completion_type Yes Yes Yes Both Yes
concurrent_insert Yes Yes Yes Global Yes
connect_timeout Yes Yes Yes Global Yes
datadir Yes Yes Yes Global No
date_format Yes Varies No
datetime_format Yes Varies No
debug Yes Yes Yes Both Yes
debug_sync Yes Varies Yes
default_storage_engine Yes Yes Yes Both Yes
default_week_format Yes Yes Yes Both Yes
delay_key_write Yes Yes Yes Global Yes
delayed_insert_limit Yes Yes Yes Global Yes
delayed_insert_timeout Yes Yes Yes Global Yes
delayed_queue_size Yes Yes Yes Global Yes
div_precision_increment Yes Yes Yes Both Yes
engine_condition_pushdown Yes Yes Yes Both Yes
error_count Yes Session No
event_scheduler Yes Yes Yes Global Yes
expire_logs_days Yes Yes Yes Global Yes
external_user Yes Session No
flush Yes Yes Yes Global Yes
flush_time Yes Yes Yes Global Yes
foreign_key_checks Yes Varies Yes
ft_boolean_syntax Yes Yes Yes Global Yes
ft_max_word_len Yes Yes Yes Global No
ft_min_word_len Yes Yes Yes Global No
ft_query_expansion_limit Yes Yes Yes Global No
ft_stopword_file Yes Yes Yes Global No
general_log Yes Yes Yes Global Yes
general_log_file Yes Yes Yes Global Yes
group_concat_max_len Yes Yes Yes Both Yes
have_compress Yes Global No
have_crypt Yes Global No
have_csv Yes Global No
have_dynamic_loading Yes Global No
have_geometry Yes Global No
have_innodb Yes Global No
have_ndbcluster Yes Global No
have_openssl Yes Global No
have_partitioning Yes Global No
have_profiling Yes Global No
have_query_cache Yes Global No
have_rtree_keys Yes Global No
have_ssl Yes Global No
have_symlink Yes Global No
hostname Yes Global No
identity Yes Session Yes
ignore_builtin_innodb Yes Yes Yes Global No
init_connect Yes Yes Yes Global Yes
init_file Yes Yes Yes Global No
init_slave Yes Yes Yes Global Yes
innodb_adaptive_flushing Yes Yes Yes Global Yes
innodb_adaptive_hash_index Yes Yes Yes Global Yes
innodb_additional_mem_pool_size Yes Yes Yes Global No
innodb_autoextend_increment Yes Yes Yes Global Yes
innodb_autoinc_lock_mode Yes Yes Yes Global No
innodb_buffer_pool_instances Yes Yes Yes Global No
innodb_buffer_pool_size Yes Yes Yes Global No
innodb_change_buffering Yes Yes Yes Global Yes
innodb_change_buffering_debug Yes Yes Yes Global Yes
innodb_checksums Yes Yes Yes Global No
innodb_commit_concurrency Yes Yes Yes Global Yes
innodb_concurrency_tickets Yes Yes Yes Global Yes
innodb_data_file_path Yes Yes Yes Global No
innodb_data_home_dir Yes Yes Yes Global No
innodb_doublewrite Yes Yes Yes Global No
innodb_fast_shutdown Yes Yes Yes Global Yes
innodb_file_format Yes Yes Yes Global Yes
innodb_file_format_check Yes Yes Yes Global Varies
innodb_file_format_max Yes Yes Yes Global Yes
innodb_file_per_table Yes Yes Yes Global Yes
innodb_flush_log_at_trx_commit Yes Yes Yes Global Yes
innodb_flush_method Yes Yes Yes Global No
innodb_force_load_corrupted Yes Yes Yes Global No
innodb_force_recovery Yes Yes Yes Global No
innodb_io_capacity Yes Yes Yes Global Yes
innodb_large_prefix Yes Yes Yes Global Yes
innodb_limit_optimistic_insert_debug Yes Yes Yes Global Yes
innodb_lock_wait_timeout Yes Yes Yes Both Yes
innodb_locks_unsafe_for_binlog Yes Yes Yes Global No
innodb_log_buffer_size Yes Yes Yes Global No
innodb_log_file_size Yes Yes Yes Global No
innodb_log_files_in_group Yes Yes Yes Global No
innodb_log_group_home_dir Yes Yes Yes Global No
innodb_max_dirty_pages_pct Yes Yes Yes Global Yes
innodb_max_purge_lag Yes Yes Yes Global Yes
innodb_mirrored_log_groups Yes Yes Yes Global No
innodb_old_blocks_pct Yes Yes Yes Global Yes
innodb_old_blocks_time Yes Yes Yes Global Yes
innodb_open_files Yes Yes Yes Global No
innodb_print_all_deadlocks Yes Yes Yes Global Yes
innodb_purge_batch_size Yes Yes Yes Global Yes
innodb_purge_threads Yes Yes Yes Global No
innodb_random_read_ahead Yes Yes Yes Global Yes
innodb_read_ahead_threshold Yes Yes Yes Global Yes
innodb_read_io_threads Yes Yes Yes Global No
innodb_replication_delay Yes Yes Yes Global Yes
innodb_rollback_on_timeout Yes Yes Yes Global No
innodb_rollback_segments Yes Yes Yes Global Yes
innodb_spin_wait_delay Yes Yes Yes Global Yes
innodb_stats_method Yes Yes Yes Global Yes
innodb_stats_on_metadata Yes Yes Yes Global Yes
innodb_stats_sample_pages Yes Yes Yes Global Yes
innodb_strict_mode Yes Yes Yes Both Yes
innodb_support_xa Yes Yes Yes Both Yes
innodb_sync_spin_loops Yes Yes Yes Global Yes
innodb_table_locks Yes Yes Yes Both Yes
innodb_thread_concurrency Yes Yes Yes Global Yes
innodb_thread_sleep_delay Yes Yes Yes Global Yes
innodb_trx_purge_view_update_only_debug Yes Yes Yes Global Yes
innodb_trx_rseg_n_slots_debug Yes Yes Yes Global Yes
innodb_use_native_aio Yes Yes Yes Global No
innodb_use_sys_malloc Yes Yes Yes Global No
innodb_version Yes Global No
innodb_write_io_threads Yes Yes Yes Global No
insert_id Yes Session Yes
interactive_timeout Yes Yes Yes Both Yes
join_buffer_size Yes Yes Yes Both Yes
keep_files_on_create Yes Yes Yes Both Yes
key_buffer_size Yes Yes Yes Global Yes
key_cache_age_threshold Yes Yes Yes Global Yes
key_cache_block_size Yes Yes Yes Global Yes
key_cache_division_limit Yes Yes Yes Global Yes
language Yes Yes Yes Global No
large_files_support Yes Global No
large_page_size Yes Global No
large-pages Yes Yes Yes Global No
last_insert_id Yes Session Yes
lc-messages Yes Yes Yes Both Yes
lc-messages-dir Yes Yes Yes Global No
lc_time_names Yes Yes Yes Both Yes
license Yes Global No
local_infile Yes Yes Yes Global Yes
lock_wait_timeout Yes Yes Yes Both Yes
locked_in_memory Yes Global No
log Yes Yes Yes Global Yes
log_bin Yes Global No
log_bin_trust_function_creators Yes Yes Yes Global Yes
log_bin_trust_routine_creators Yes Yes Yes Global Yes
log_bin_use_v1_row_events Yes Yes Yes Global No
log-error Yes Yes Yes Global No
log_output Yes Yes Yes Global Yes
log_queries_not_using_indexes Yes Yes Yes Global Yes
log_slave_updates Yes Yes Yes Global No
log_slow_queries Yes Yes Yes Global Yes
log-warnings Yes Yes Yes Both Yes
long_query_time Yes Yes Yes Both Yes
low_priority_updates Yes Yes Yes Both Yes
lower_case_file_system Yes Global No
lower_case_table_names Yes Yes Yes Global No
max_allowed_packet Yes Yes Yes Both Yes
max_binlog_cache_size Yes Yes Yes Global Yes
max_binlog_size Yes Yes Yes Global Yes
max_binlog_stmt_cache_size Yes Yes Yes Global Yes
max_connect_errors Yes Yes Yes Global Yes
max_connections Yes Yes Yes Global Yes
max_delayed_threads Yes Yes Yes Both Yes
max_error_count Yes Yes Yes Both Yes
max_heap_table_size Yes Yes Yes Both Yes
max_insert_delayed_threads Yes Both Yes
max_join_size Yes Yes Yes Both Yes
max_length_for_sort_data Yes Yes Yes Both Yes
max_long_data_size Yes Yes Yes Global No
max_prepared_stmt_count Yes Yes Yes Global Yes
max_relay_log_size Yes Yes Yes Global Yes
max_seeks_for_key Yes Yes Yes Both Yes
max_sort_length Yes Yes Yes Both Yes
max_sp_recursion_depth Yes Yes Yes Both Yes
max_tmp_tables Yes Both Yes
max_user_connections Yes Yes Yes Both Yes
max_write_lock_count Yes Yes Yes Global Yes
metadata_locks_cache_size Yes Yes Yes Global No
min_examined_row_limit Yes Yes Yes Both Yes
multi_range_count Yes Yes Yes Both Yes
myisam_data_pointer_size Yes Yes Yes Global Yes
myisam_max_sort_file_size Yes Yes Yes Global Yes
myisam_mmap_size Yes Yes Yes Global No
myisam_recover_options Yes Yes Yes Global No
myisam_repair_threads Yes Yes Yes Both Yes
myisam_sort_buffer_size Yes Yes Yes Both Yes
myisam_stats_method Yes Yes Yes Both Yes
myisam_use_mmap Yes Yes Yes Global Yes
named_pipe Yes Yes Yes Global No
ndb_autoincrement_prefetch_sz Yes Yes Yes Both Yes
ndb-batch-size Yes Yes No
- Variable: ndb_batch_size Yes Global No
ndb-blob-read-batch-bytes Yes Yes Yes
- Variable: ndb_blob_read_batch_bytes Yes Both Yes
ndb-blob-write-batch-bytes Yes Yes Yes
- Variable: ndb_blob_write_batch_bytes Yes Both Yes
ndb_cache_check_time Yes Yes Yes Global Yes
ndb-cluster-connection-pool Yes Yes Yes Global No
ndb-deferred-constraints Yes Yes Yes
- Variable: ndb_deferred_constraints Yes Both Yes
ndb_deferred_constraints Yes Yes Yes Both Yes
ndb-distribution Yes Yes Yes
- Variable: ndb_distribution Yes Global Yes
ndb_distribution Yes Yes Yes Global Yes
ndb_eventbuffer_max_alloc Yes Yes Yes Global Yes
ndb_extra_logging Yes Yes Yes Global Yes
ndb_force_send Yes Yes Yes Both Yes
ndb_index_stat_cache_entries Yes Yes Yes Both Yes
ndb_index_stat_enable Yes Yes Yes Both Yes
ndb_index_stat_option Yes Yes Yes Both Yes
ndb_index_stat_update_freq Yes Yes Yes Both Yes
ndb_join_pushdown Yes Both Yes
ndb-log-apply-status Yes Yes No
- Variable: ndb_log_apply_status Yes Global No
ndb_log_apply_status Yes Yes Yes Global No
ndb_log_bin Yes Yes Both Yes
ndb_log_binlog_index Yes Yes Global Yes
ndb-log-empty-epochs Yes Yes Yes
- Variable: ndb_log_empty_epochs Yes Global Yes
ndb_log_empty_epochs Yes Yes Yes Global Yes
ndb-log-empty-update Yes Yes Yes
- Variable: ndb_log_empty_update Yes Global Yes
ndb_log_empty_update Yes Yes Yes Global Yes
ndb-log-orig Yes Yes No
- Variable: ndb_log_orig Yes Global No
ndb_log_orig Yes Yes Yes Global No
ndb-log-transaction-id Yes Yes No
- Variable: ndb_log_transaction_id Yes Global No
ndb_log_transaction_id Yes Global No
ndb-log-update-as-write Yes Yes Yes
- Variable: ndb_log_update_as_write Yes Global Yes
ndb_log_updated_only Yes Yes Yes Global Yes
ndb-optimization-delay Yes Yes Yes
- Variable: ndb_optimization_delay Yes Global Yes
ndb_optimized_node_selection Yes Yes Yes Global No
ndb_report_thresh_binlog_epoch_slip Yes Yes Yes Global Yes
ndb_report_thresh_binlog_mem_usage Yes Yes Yes Global Yes
ndb_table_no_logging Yes Session Yes
ndb_table_temporary Yes Session Yes
ndb_use_copying_alter_table Yes Both No
ndb_use_exact_count Yes Both Yes
ndb_use_transactions Yes Yes Yes Both Yes
ndb_version Yes Global No
ndb_version_string Yes Global No
ndb-wait-connected Yes Yes Yes Global No
ndb-wait-setup Yes Yes Yes Global No
ndbinfo_database Yes Global No
ndbinfo_max_bytes Yes Yes Both Yes
ndbinfo_max_rows Yes Yes Both Yes
ndbinfo_offline Yes Global Yes
ndbinfo_show_hidden Yes Yes Both Yes
ndbinfo_table_prefix Yes Yes Both Yes
ndbinfo_version Yes Global No
net_buffer_length Yes Yes Yes Both Yes
net_read_timeout Yes Yes Yes Both Yes
net_retry_count Yes Yes Yes Both Yes
net_write_timeout Yes Yes Yes Both Yes
new Yes Yes Yes Both Yes
old Yes Yes Yes Global No
old_alter_table Yes Yes Yes Both Yes
old_passwords Yes Yes Yes Both Yes
open_files_limit Yes Yes Yes Global No
optimizer_prune_level Yes Yes Yes Both Yes
optimizer_search_depth Yes Yes Yes Both Yes
optimizer_switch Yes Yes Yes Both Yes
performance_schema Yes Yes Yes Global No
performance_schema_events_waits_history_long_size Yes Yes Yes Global No
performance_schema_events_waits_history_size Yes Yes Yes Global No
performance_schema_max_cond_classes Yes Yes Yes Global No
performance_schema_max_cond_instances Yes Yes Yes Global No
performance_schema_max_file_classes Yes Yes Yes Global No
performance_schema_max_file_handles Yes Yes Yes Global No
performance_schema_max_file_instances Yes Yes Yes Global No
performance_schema_max_mutex_classes Yes Yes Yes Global No
performance_schema_max_mutex_instances Yes Yes Yes Global No
performance_schema_max_rwlock_classes Yes Yes Yes Global No
performance_schema_max_rwlock_instances Yes Yes Yes Global No
performance_schema_max_table_handles Yes Yes Yes Global No
performance_schema_max_table_instances Yes Yes Yes Global No
performance_schema_max_thread_classes Yes Yes Yes Global No
performance_schema_max_thread_instances Yes Yes Yes Global No
pid_file Yes Yes Yes Global No
plugin_dir Yes Yes Yes Global No
plugin-load Yes Yes Yes Global No
port Yes Yes Yes Global No
preload_buffer_size Yes Yes Yes Both Yes
profiling Yes Varies Yes
profiling_history_size Yes Yes Yes Both Yes
protocol_version Yes Global No
proxy_user Yes Session No
pseudo_slave_mode Yes Session Yes
pseudo_thread_id Yes Session Yes
query_alloc_block_size Yes Yes Yes Both Yes
query_cache_limit Yes Yes Yes Global Yes
query_cache_min_res_unit Yes Yes Yes Global Yes
query_cache_size Yes Yes Yes Global Yes
query_cache_type Yes Yes Yes Both Yes
query_cache_wlock_invalidate Yes Yes Yes Both Yes
query_prealloc_size Yes Yes Yes Both Yes
rand_seed1 Yes Session Yes
rand_seed2 Yes Session Yes
range_alloc_block_size Yes Yes Yes Both Yes
read_buffer_size Yes Yes Yes Both Yes
read_only Yes Yes Yes Global Yes
read_rnd_buffer_size Yes Yes Yes Both Yes
relay_log Yes Yes Yes Global No
relay_log_index Yes Yes Yes Global No
relay_log_info_file Yes Yes Yes Global No
relay_log_purge Yes Yes Yes Global Yes
relay_log_recovery Yes Yes Yes Global Yes
relay_log_space_limit Yes Yes Yes Global No
report_host Yes Yes Yes Global No
report_password Yes Yes Yes Global No
report_port Yes Yes Yes Global No
report_user Yes Yes Yes Global No
rpl_recovery_rank Yes Global Yes
rpl_semi_sync_master_enabled Yes Yes Yes Global Yes
rpl_semi_sync_master_timeout Yes Yes Yes Global Yes
rpl_semi_sync_master_trace_level Yes Yes Yes Global Yes
rpl_semi_sync_master_wait_no_slave Yes Yes Yes Global Yes
rpl_semi_sync_slave_enabled Yes Yes Yes Global Yes
rpl_semi_sync_slave_trace_level Yes Yes Yes Global Yes
secure_auth Yes Yes Yes Global Yes
secure_file_priv Yes Yes Yes Global No
server_id Yes Yes Yes Global Yes
server_id_bits Yes Yes Yes Global No
shared_memory Yes Yes Yes Global No
shared_memory_base_name Yes Yes Yes Global No
skip_external_locking Yes Yes Yes Global No
skip_name_resolve Yes Yes Yes Global No
skip_networking Yes Yes Yes Global No
skip-show-database Yes Yes Yes Global No
slave_allow_batching Yes Yes Yes Global Yes
slave_compressed_protocol Yes Yes Yes Global Yes
slave_exec_mode Yes Yes Yes Global Yes
slave_load_tmpdir Yes Yes Yes Global No
slave_max_allowed_packet Yes Yes Yes Global Yes
slave_net_timeout Yes Yes Yes Global Yes
slave-skip-errors Yes Yes Yes Global No
slave_transaction_retries Yes Yes Yes Global Yes
slave_type_conversions Yes Yes Yes Global No
slow_launch_time Yes Yes Yes Global Yes
slow_query_log Yes Yes Yes Global Yes
slow_query_log_file Yes Yes Yes Global Yes
socket Yes Yes Yes Global No
sort_buffer_size Yes Yes Yes Both Yes
sql_auto_is_null Yes Varies Yes
sql_big_selects Yes Varies Yes
sql_big_tables Yes Varies Yes
sql_buffer_result Yes Varies Yes
sql_log_bin Yes Varies Yes
sql_log_off Yes Varies Yes
sql_log_update Yes Session Yes
sql_low_priority_updates Yes Both Yes
sql_max_join_size Yes Both Yes
sql-mode Yes Yes Yes Both Yes
sql_notes Yes Varies Yes
sql_quote_show_create Yes Varies Yes
sql_safe_updates Yes Varies Yes
sql_select_limit Yes Both Yes
sql_slave_skip_counter Yes Global Yes
sql_warnings Yes Varies Yes
ssl-ca Yes Yes Yes Global No
ssl-capath Yes Yes Yes Global No
ssl-cert Yes Yes Yes Global No
ssl-cipher Yes Yes Yes Global No
ssl-key Yes Yes Yes Global No
storage_engine Yes Both Yes
stored_program_cache Yes Yes Yes Global Yes
sync_binlog Yes Yes Yes Global Yes
sync_frm Yes Yes Yes Global Yes
sync_master_info Yes Yes Yes Global Yes
sync_relay_log Yes Yes Yes Global Yes
sync_relay_log_info Yes Yes Yes Global Yes
system_time_zone Yes Global No
table_definition_cache Yes Yes Yes Global Yes
table_lock_wait_timeout Yes Yes Yes Global Yes
table_open_cache Yes Yes Yes Global Yes
table_type Yes Both Yes
thread_cache_size Yes Yes Yes Global Yes
thread_concurrency Yes Yes Yes Global No
thread_handling Yes Yes Yes Global No
thread_pool_algorithm Yes Yes Yes Global No
thread_pool_high_priority_connection Yes Yes Yes Both Yes
thread_pool_max_unused_threads Yes Yes Yes Global Yes
thread_pool_prio_kickup_timer Yes Yes Yes Both Yes
thread_pool_size Yes Yes Yes Global No
thread_pool_stall_limit Yes Yes Yes Global Yes
thread_stack Yes Yes Yes Global No
time_format Yes Varies No
time_zone Yes Both Yes
timed_mutexes Yes Yes Yes Global Yes
timestamp Yes Session Yes
tmp_table_size Yes Yes Yes Both Yes
tmpdir Yes Yes Yes Global No
transaction_alloc_block_size Yes Yes Yes Both Yes
transaction_allow_batching Yes Session Yes
transaction_prealloc_size Yes Yes Yes Both Yes
tx_isolation Yes Both Yes
unique_checks Yes Varies Yes
updatable_views_with_limit Yes Yes Yes Both Yes
version Yes Global No
version_comment Yes Global No
version_compile_machine Yes Global No
version_compile_os Yes Global No
wait_timeout Yes Yes Yes Both Yes
warning_count Yes Session No

Notes:

1. This option is dynamic, but only the server should set this information. You should not set the value of this variable manually.

5.1.5 Server Status Variable Reference

The following table lists all status 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.

Table 5.3 Status Variable Summary

Variable Name Variable Type Variable Scope
Aborted_clients Integer Global
Aborted_connects Integer Global
Binlog_cache_disk_use Integer Global
Binlog_cache_use Integer Global
Binlog_stmt_cache_disk_use Integer Global
Binlog_stmt_cache_use Integer Global
Bytes_received Integer Both
Bytes_sent Integer Both
Com_admin_commands Integer Both
Com_alter_db Integer Both
Com_alter_db_upgrade Integer Both
Com_alter_event Integer Both
Com_alter_function Integer Both
Com_alter_procedure Integer Both
Com_alter_server Integer Both
Com_alter_table Integer Both
Com_alter_tablespace Integer Both
Com_analyze Integer Both
Com_assign_to_keycache Integer Both
Com_begin Integer Both
Com_binlog Integer Both
Com_call_procedure Integer Both
Com_change_db Integer Both
Com_change_master Integer Both
Com_check Integer Both
Com_checksum Integer Both
Com_commit Integer Both
Com_create_db Integer Both
Com_create_event Integer Both
Com_create_function Integer Both
Com_create_index Integer Both
Com_create_procedure Integer Both
Com_create_server Integer Both
Com_create_table Integer Both
Com_create_trigger Integer Both
Com_create_udf Integer Both
Com_create_user Integer Both
Com_create_view Integer Both
Com_dealloc_sql Integer Both
Com_delete Integer Both
Com_delete_multi Integer Both
Com_do Integer Both
Com_drop_db Integer Both
Com_drop_event Integer Both
Com_drop_function Integer Both
Com_drop_index Integer Both
Com_drop_procedure Integer Both
Com_drop_server Integer Both
Com_drop_table Integer Both
Com_drop_trigger Integer Both
Com_drop_user Integer Both
Com_drop_view Integer Both
Com_empty_query Integer Both
Com_execute_sql Integer Both
Com_flush Integer Both
Com_grant Integer Both
Com_ha_close Integer Both
Com_ha_open Integer Both
Com_ha_read Integer Both
Com_help Integer Both
Com_insert Integer Both
Com_insert_select Integer Both
Com_install_plugin Integer Both
Com_kill Integer Both
Com_load Integer Both
Com_lock_tables Integer Both
Com_optimize Integer Both
Com_preload_keys Integer Both
Com_prepare_sql Integer Both
Com_purge Integer Both
Com_purge_before_date Integer Both
Com_release_savepoint Integer Both
Com_rename_table Integer Both
Com_rename_user Integer Both
Com_repair Integer Both
Com_replace Integer Both
Com_replace_select Integer Both
Com_reset Integer Both
Com_resignal Integer Both
Com_revoke Integer Both
Com_revoke_all Integer Both
Com_rollback Integer Both
Com_rollback_to_savepoint Integer Both
Com_savepoint Integer Both
Com_select Integer Both
Com_set_option Integer Both
Com_show_authors Integer Both
Com_show_binlog_events Integer Both
Com_show_binlogs Integer Both
Com_show_charsets Integer Both
Com_show_collations Integer Both
Com_show_contributors Integer Both
Com_show_create_db Integer Both
Com_show_create_event Integer Both
Com_show_create_func Integer Both
Com_show_create_proc Integer Both
Com_show_create_table Integer Both
Com_show_create_trigger Integer Both
Com_show_databases Integer Both
Com_show_engine_logs Integer Both
Com_show_engine_mutex Integer Both
Com_show_engine_status Integer Both
Com_show_errors Integer Both
Com_show_events Integer Both
Com_show_fields Integer Both
Com_show_function_code Integer Both
Com_show_function_status Integer Both
Com_show_grants Integer Both
Com_show_keys Integer Both
Com_show_master_status Integer Both
Com_show_ndb_status Integer Both
Com_show_new_master Integer Both
Com_show_open_tables Integer Both
Com_show_plugins Integer Both
Com_show_privileges Integer Both
Com_show_procedure_code Integer Both
Com_show_procedure_status Integer Both
Com_show_processlist Integer Both
Com_show_profile Integer Both
Com_show_profiles Integer Both
Com_show_relaylog_events Integer Both
Com_show_slave_hosts Integer Both
Com_show_slave_status Integer Both
Com_show_status Integer Both
Com_show_storage_engines Integer Both
Com_show_table_status Integer Both
Com_show_tables Integer Both
Com_show_triggers Integer Both
Com_show_variables Integer Both
Com_show_warnings Integer Both
Com_signal Integer Both
Com_slave_start Integer Both
Com_slave_stop Integer Both
Com_stmt_close Integer Both
Com_stmt_execute Integer Both
Com_stmt_fetch Integer Both
Com_stmt_prepare Integer Both
Com_stmt_reprepare Integer Both
Com_stmt_reset Integer Both
Com_stmt_send_long_data Integer Both
Com_truncate Integer Both
Com_uninstall_plugin Integer Both
Com_unlock_tables Integer Both
Com_update Integer Both
Com_update_multi Integer Both
Com_xa_commit Integer Both
Com_xa_end Integer Both
Com_xa_prepare Integer Both
Com_xa_recover Integer Both
Com_xa_rollback Integer Both
Com_xa_start Integer Both
Compression Integer Session
Connections Integer Global
Created_tmp_disk_tables Integer Both
Created_tmp_files Integer Global
Created_tmp_tables Integer Both
Delayed_errors Integer Global
Delayed_insert_threads Integer Global
Delayed_writes Integer Global
Flush_commands Integer Global
Handler_commit Integer Both
Handler_delete Integer Both
Handler_discover Integer Both
Handler_prepare Integer Both
Handler_read_first Integer Both
Handler_read_key Integer Both
Handler_read_last Integer Both
Handler_read_next Integer Both
Handler_read_prev Integer Both
Handler_read_rnd Integer Both
Handler_read_rnd_next Integer Both
Handler_rollback Integer Both
Handler_savepoint Integer Both
Handler_savepoint_rollback Integer Both
Handler_update Integer Both
Handler_write Integer Both
Innodb_buffer_pool_bytes_data Integer Global
Innodb_buffer_pool_bytes_dirty Integer Global
Innodb_buffer_pool_pages_data Integer Global
Innodb_buffer_pool_pages_dirty Integer Global
Innodb_buffer_pool_pages_flushed Integer Global
Innodb_buffer_pool_pages_free Integer Global
Innodb_buffer_pool_pages_latched Integer Global
Innodb_buffer_pool_pages_misc Integer Global
Innodb_buffer_pool_pages_total Integer Global
Innodb_buffer_pool_read_ahead Integer Global
Innodb_buffer_pool_read_ahead_evicted Integer Global
Innodb_buffer_pool_read_ahead_rnd Integer Global
Innodb_buffer_pool_read_requests Integer Global
Innodb_buffer_pool_reads Integer Global
Innodb_buffer_pool_wait_free Integer Global
Innodb_buffer_pool_write_requests Integer Global
Innodb_data_fsyncs Integer Global
Innodb_data_pending_fsyncs Integer Global
Innodb_data_pending_reads Integer Global
Innodb_data_pending_writes Integer Global
Innodb_data_read Integer Global
Innodb_data_reads Integer Global
Innodb_data_writes Integer Global
Innodb_data_written Integer Global
Innodb_dblwr_pages_written Integer Global
Innodb_dblwr_writes Integer Global
Innodb_have_atomic_builtins Integer Global
Innodb_log_waits Integer Global
Innodb_log_write_requests Integer Global
Innodb_log_writes Integer Global
Innodb_os_log_fsyncs Integer Global
Innodb_os_log_pending_fsyncs Integer Global
Innodb_os_log_pending_writes Integer Global
Innodb_os_log_written Integer Global
Innodb_page_size Integer Global
Innodb_pages_created Integer Global
Innodb_pages_read Integer Global
Innodb_pages_written Integer Global
Innodb_row_lock_current_waits Integer Global
Innodb_row_lock_time Integer Global
Innodb_row_lock_time_avg Integer Global
Innodb_row_lock_time_max Integer Global
Innodb_row_lock_waits Integer Global
Innodb_rows_deleted Integer Global
Innodb_rows_inserted Integer Global
Innodb_rows_read Integer Global
Innodb_rows_updated Integer Global
Innodb_truncated_status_writes Integer Global
Key_blocks_not_flushed Integer Global
Key_blocks_unused Integer Global
Key_blocks_used Integer Global
Key_read_requests Integer Global
Key_reads Integer Global
Key_write_requests Integer Global
Key_writes Integer Global
Last_query_cost Numeric Session
Max_used_connections Integer Global
Ndb_api_bytes_received_count Integer Global
Ndb_api_bytes_received_count_session Integer Session
Ndb_api_bytes_received_count_slave Integer Global
Ndb_api_bytes_sent_count Integer Global
Ndb_api_bytes_sent_count_session Integer Session
Ndb_api_bytes_sent_count_slave Integer Global
Ndb_api_event_bytes_count Integer Global
Ndb_api_event_bytes_count_injector Integer Global
Ndb_api_event_data_count Integer Global
Ndb_api_event_data_count_injector Integer Global
Ndb_api_event_nondata_count Integer Global
Ndb_api_event_nondata_count_injector Integer Global
Ndb_api_pk_op_count Integer Global
Ndb_api_pk_op_count_session Integer Session
Ndb_api_pk_op_count_slave Integer Global
Ndb_api_pruned_scan_count Integer Global
Ndb_api_pruned_scan_count_session Integer Session
Ndb_api_pruned_scan_count_slave Integer Global
Ndb_api_range_scan_count Integer Global
Ndb_api_range_scan_count_session Integer Session
Ndb_api_range_scan_count_slave Integer Global
Ndb_api_read_row_count Integer Global
Ndb_api_read_row_count_session Integer Session
Ndb_api_read_row_count_slave Integer Global
Ndb_api_scan_batch_count Integer Global
Ndb_api_scan_batch_count_session Integer Session
Ndb_api_scan_batch_count_slave Integer Global
Ndb_api_table_scan_count Integer Global
Ndb_api_table_scan_count_session Integer Session
Ndb_api_table_scan_count_slave Integer Global
Ndb_api_trans_abort_count Integer Global
Ndb_api_trans_abort_count_session Integer Session
Ndb_api_trans_abort_count_slave Integer Global
Ndb_api_trans_close_count Integer Global
Ndb_api_trans_close_count_session Integer Session
Ndb_api_trans_close_count_slave Integer Global
Ndb_api_trans_commit_count Integer Global
Ndb_api_trans_commit_count_session Integer Session
Ndb_api_trans_commit_count_slave Integer Global
Ndb_api_trans_local_read_row_count Integer Global
Ndb_api_trans_local_read_row_count_session Integer Session
Ndb_api_trans_local_read_row_count_slave Integer Global
Ndb_api_trans_start_count Integer Global
Ndb_api_trans_start_count_session Integer Session
Ndb_api_trans_start_count_slave Integer Global
Ndb_api_uk_op_count Integer Global
Ndb_api_uk_op_count_session Integer Session
Ndb_api_uk_op_count_slave Integer Global
Ndb_api_wait_exec_complete_count Integer Global
Ndb_api_wait_exec_complete_count_session Integer Session
Ndb_api_wait_exec_complete_count_slave Integer Global
Ndb_api_wait_meta_request_count Integer Global
Ndb_api_wait_meta_request_count_session Integer Session
Ndb_api_wait_meta_request_count_slave Integer Global
Ndb_api_wait_nanos_count Integer Global
Ndb_api_wait_nanos_count_session Integer Session
Ndb_api_wait_nanos_count_slave Integer Global
Ndb_api_wait_scan_result_count Integer Global
Ndb_api_wait_scan_result_count_session Integer Session
Ndb_api_wait_scan_result_count_slave Integer Global
Ndb_cluster_node_id Integer Global
Ndb_config_from_host Integer Both
Ndb_config_from_port Integer Both
Ndb_conflict_fn_epoch Integer Global
Ndb_conflict_fn_epoch_trans Integer Global
Ndb_conflict_fn_max Integer Global
Ndb_conflict_fn_old Integer Global
Ndb_conflict_trans_conflict_commit_count Integer Global
Ndb_conflict_trans_detect_iter_count Integer Global
Ndb_conflict_trans_reject_count Integer Global
Ndb_conflict_trans_row_reject_count Integer Global
Ndb_execute_count Integer Global
Ndb_cluster_node_id Integer Global
Ndb_number_of_data_nodes Integer Global
Ndb_pruned_scan_count Integer Global
Ndb_pushed_queries_defined Integer Global
Ndb_pushed_queries_dropped Integer Global
Ndb_pushed_queries_executed Integer Global
Ndb_pushed_reads Integer Global
Ndb_scan_count Integer Global
Not_flushed_delayed_rows Integer Global
Open_files Integer Global
Open_streams Integer Global
Open_table_definitions Integer Global
Open_tables Integer Both
Opened_files Integer Global
Opened_table_definitions Integer Both
Opened_tables Integer Both
Performance_schema_cond_classes_lost Integer Global
Performance_schema_cond_instances_lost Integer Global
Performance_schema_file_classes_lost Integer Global
Performance_schema_file_handles_lost Integer Global
Performance_schema_file_instances_lost Integer Global
Performance_schema_locker_lost Integer Global
Performance_schema_mutex_classes_lost Integer Global
Performance_schema_mutex_instances_lost Integer Global
Performance_schema_rwlock_classes_lost Integer Global
Performance_schema_rwlock_instances_lost Integer Global
Performance_schema_table_handles_lost Integer Global
Performance_schema_table_instances_lost Integer Global
Performance_schema_thread_classes_lost Integer Global
Performance_schema_thread_instances_lost Integer Global
Prepared_stmt_count Integer Global
Qcache_free_blocks Integer Global
Qcache_free_memory Integer Global
Qcache_hits Integer Global
Qcache_inserts Integer Global
Qcache_lowmem_prunes Integer Global
Qcache_not_cached Integer Global
Qcache_queries_in_cache Integer Global
Qcache_total_blocks Integer Global
Queries Integer Both
Questions Integer Both
Rpl_semi_sync_master_clients Integer Global
Rpl_semi_sync_master_net_avg_wait_time Integer Global
Rpl_semi_sync_master_net_wait_time Integer Global
Rpl_semi_sync_master_net_waits Integer Global
Rpl_semi_sync_master_no_times Integer Global
Rpl_semi_sync_master_no_tx Integer Global
Rpl_semi_sync_master_status Boolean Global
Rpl_semi_sync_master_timefunc_failures Integer Global
Rpl_semi_sync_master_tx_avg_wait_time Integer Global
Rpl_semi_sync_master_tx_wait_time Integer Global
Rpl_semi_sync_master_tx_waits Integer Global
Rpl_semi_sync_master_wait_pos_backtraverse Integer Global
Rpl_semi_sync_master_wait_sessions Integer Global
Rpl_semi_sync_master_yes_tx Integer Global
Rpl_semi_sync_slave_status Boolean Global
Rpl_status String Global
Select_full_join Integer Both
Select_full_range_join Integer Both
Select_range Integer Both
Select_range_check Integer Both
Select_scan Integer Both
Slave_heartbeat_period Numeric Global
Slave_open_temp_tables Integer Global
Slave_received_heartbeats Integer Global
Slave_retried_transactions Integer Global
Slave_running Boolean Global
Slow_launch_threads Integer Both
Slow_queries Integer Both
Sort_merge_passes Integer Both
Sort_range Integer Both
Sort_rows Integer Both
Sort_scan Integer Both
Ssl_accept_renegotiates Integer Global
Ssl_accepts Integer Global
Ssl_callback_cache_hits Integer Global
Ssl_cipher String Both
Ssl_cipher_list String Both
Ssl_client_connects Integer Global
Ssl_connect_renegotiates Integer Global
Ssl_ctx_verify_depth Integer Global
Ssl_ctx_verify_mode Integer Global
Ssl_default_timeout Integer Both
Ssl_finished_accepts Integer Global
Ssl_finished_connects Integer Global
Ssl_session_cache_hits Integer Global
Ssl_session_cache_misses Integer Global
Ssl_session_cache_mode String Global
Ssl_session_cache_overflows Integer Global
Ssl_session_cache_size Integer Global
Ssl_session_cache_timeouts Integer Global
Ssl_sessions_reused Integer Both
Ssl_used_session_cache_entries Integer Global
Ssl_verify_depth Integer Both
Ssl_verify_mode Integer Both
Ssl_version String Both
Table_locks_immediate Integer Global
Table_locks_waited Integer Global
Tc_log_max_pages_used Integer Global
Tc_log_page_size Integer Global
Tc_log_page_waits Integer Global
Threads_cached Integer Global
Threads_connected Integer Global
Threads_created Integer Global
Threads_running Integer Global
Uptime Integer Global
Uptime_since_flush_status Integer Global

5.1.6 Server Command Options

When you start the mysqld server, you can specify program options using any of the methods described in Section 4.2.2, “Specifying Program Options”. The most common methods are to provide options in an option file or on the command line. However, in most cases it is desirable to make sure that the server uses the same options each time it runs. The best way to ensure this is to list them in an option file. See Section 4.2.2.2, “Using Option Files”. That section also describes option file format and syntax.

mysqld reads options from the [mysqld] and [server] groups. mysqld_safe reads options from the [mysqld], [server], [mysqld_safe], and [safe_mysqld] groups. mysql.server reads options from the [mysqld] and [mysql.server] groups.

An embedded MySQL server usually reads options from the [server], [embedded], and [xxxxx_SERVER] groups, where xxxxx is the name of the application into which the server is embedded.

mysqld accepts many command options. For a brief summary, execute this command:

mysqld --help

To see the full list, use this command:

mysqld --verbose --help

Some of the items in the list are actually system variables that can be set at server startup. These can be displayed at runtime using the SHOW VARIABLES statement. Some items displayed by the preceding mysqld command do not appear in SHOW VARIABLES output; this is because they are options only and not system variables.

The following list shows some of the most common server options. Additional options are described in other sections:

Some options control the size of buffers or caches. For a given buffer, the server might need to allocate internal data structures. These structures typically are allocated from the total memory allocated to the buffer, and the amount of space required might be platform dependent. This means that when you assign a value to an option that controls a buffer size, the amount of space actually available might differ from the value assigned. In some cases, the amount might be less than the value assigned. It is also possible that the server will adjust a value upward. For example, if you assign a value of 0 to an option for which the minimal value is 1024, the server will set the value to 1024.

Values for buffer sizes, lengths, and stack sizes are given in bytes unless otherwise specified.

Some options take file name values. Unless otherwise specified, the default file location is the data directory if the value is a relative path name. To specify the location explicitly, use an absolute path name. Suppose that the data directory is /var/mysql/data. If a file-valued option is given as a relative path name, it will be located under /var/mysql/data. If the value is an absolute path name, its location is as given by the path name.

You can also set the values of server system variables at server startup by using variable names as options. To assign a value to a server system variable, use an option of the form --var_name=value. For example, --key_buffer_size=32M sets the key_buffer_size variable to a value of 32MB.

When you assign a value to a variable, MySQL might automatically correct the value to stay within a given range, or adjust the value to the closest permissible value if only certain values are permitted.

To restrict the maximum value to which a system variable can be set at runtime with the SET statement, specify this maximum by using an option of the form --maximum-var_name=value at server startup.

You can change the values of most system variables at runtime with the SET statement. See Section 13.7.4.1, “SET Syntax for Variable Assignment”.

Section 5.1.7, “Server System Variables”, provides a full description for all variables, and additional information for setting them at server startup and runtime. For information on changing system variables, see Section 5.1.1, “Configuring the Server”.

  • --help, -?

    Property Value
    Command-Line Format --help

    Display a short help message and exit. Use both the --verbose and --help options to see the full message.

  • --allow-suspicious-udfs

    Property Value
    Command-Line Format --allow-suspicious-udfs[={OFF|ON}]
    Type Boolean
    Default Value OFF

    This option controls whether user-defined functions that have only an xxx symbol for the main function can be loaded. By default, the option is off and only UDFs that have at least one auxiliary symbol can be loaded; this prevents attempts at loading functions from shared object files other than those containing legitimate UDFs. See UDF Security Precautions.

  • --ansi

    Property Value
    Command-Line Format --ansi

    Use standard (ANSI) SQL syntax instead of MySQL syntax. For more precise control over the server SQL mode, use the --sql-mode option instead. See Section 1.7, “MySQL Standards Compliance”, and Section 5.1.10, “Server SQL Modes”.

  • --basedir=dir_name, -b dir_name

    Property Value
    Command-Line Format --basedir=dir_name
    System Variable basedir
    Scope Global
    Dynamic No
    Type Directory name
    Default Value configuration-dependent default

    The path to the MySQL installation directory. This option sets the basedir system variable.

  • --bind-address=addr

    Property Value
    Command-Line Format --bind-address=addr
    Type String
    Default Value 0.0.0.0

    The MySQL server listens on a single network socket for TCP/IP connections. This socket is bound to a single address, but it is possible for an address to map onto multiple network interfaces. The default address is 0.0.0.0. To specify an address explicitly, use the --bind-address=addr option at server startup, where addr is an IPv4 or IPv6 address or a host name. If addr is a host name, the server resolves the name to an IP address and binds to that address. If a host name resolves to multiple IP addresses, the server uses the first IPv4 address if there are any, or the first IPv6 address otherwise.

    The server treats different types of addresses as follows:

    • If the address is 0.0.0.0, the server accepts TCP/IP connections on all server host IPv4 interfaces.

    • If the address is ::, the server accepts TCP/IP connections on all server host IPv4 and IPv6 interfaces. Use this address to permit both IPv4 and IPv6 connections on all server interfaces.

    • If the address is an IPv4-mapped address, the server accepts TCP/IP connections for that address, in either IPv4 or IPv6 format. For example, if the server is bound to ::ffff:127.0.0.1, clients can connect using --host=127.0.0.1 or --host=::ffff:127.0.0.1.

    • If the address is a regular IPv4 or IPv6 address (such as 127.0.0.1 or ::1), the server accepts TCP/IP connections only for that IPv4 or IPv6 address.

    If binding to the address fails, the server produces an error and does not start.

    If you intend to bind the server to a specific address, be sure that the mysql.user system table contains an account with administrative privileges that you can use to connect to that address. Otherwise, you will not be able to shut down the server. For example, if you bind the server to ::, you can connect to it using all existing accounts. But if you bind the server to ::1, it accepts connections only on that address. In that case, first make sure that the 'root'@'::1' account is present in the mysql.user table so you can still connect to the server to shut it down.

  • --bootstrap

    Property Value
    Command-Line Format --bootstrap

    This option is used by the mysql_install_db program to create the MySQL privilege tables without having to start a full MySQL server.

    When the server operates in bootstap mode, some functionality is unavailable that limits the statements permitted in any file named by the init_file system variable. For more information, see the description of that variable.

  • --character-set-client-handshake

    Property Value
    Command-Line Format --character-set-client-handshake[={OFF|ON}]
    Type Boolean
    Default Value ON

    Do not ignore character set information sent by the client. To ignore client information and use the default server character set, use --skip-character-set-client-handshake; this makes MySQL behave like MySQL 4.0.

  • --chroot=dir_name, -r dir_name

    Property Value
    Command-Line Format --chroot=dir_name
    Type Directory name

    Put the mysqld server in a closed environment during startup by using the chroot() system call. This is a recommended security measure. Use of this option somewhat limits LOAD DATA and SELECT ... INTO OUTFILE.

  • --console

    Property Value
    Command-Line Format --console
    Platform Specific Windows

    (Windows only.) Write error log messages to stderr and stdout (the console). mysqld does not close the console window if this option is used.

    --log-error takes precedence over --console if both are given.

  • --core-file

    Property Value
    Command-Line Format --core-file[={OFF|ON}]
    Type Boolean
    Default Value OFF

    Write a core file if mysqld dies. The name and location of the core file is system dependent. On Linux, a core file named core.pid is written to the current working directory of the process, which for mysqld is the data directory. pid represents the process ID of the server process. On macOS, a core file named core.pid is written to the /cores directory. On Solaris, use the coreadm command to specify where to write the core file and how to name it.

    For some systems, to get a core file you must also specify the --core-file-size option to mysqld_safe. See Section 4.3.2, “mysqld_safe — MySQL Server Startup Script”. On some systems, such as Solaris, you do not get a core file if you are also using the --user option. There might be additional restrictions or limitations. For example, it might be necessary to execute ulimit -c unlimited before starting the server. Consult your system documentation.

  • --datadir=dir_name, -h dir_name

    Property Value
    Command-Line Format --datadir=dir_name
    System Variable datadir
    Scope Global
    Dynamic No
    Type Directory name

    The path to the MySQL server data directory. This option sets the datadir system variable. See the description of that variable.

  • --debug[=debug_options], -# [debug_options]

    Property Value
    Command-Line Format --debug[=debug_options]
    System Variable debug
    Scope Global, Session
    Dynamic Yes
    Type String
    Default Value (Windows) d:t:i:O,\mysqld.trace
    Default Value (Unix) d:t:i:o,/tmp/mysqld.trace

    If MySQL is configured with the -DWITH_DEBUG=1 CMake option, you can use this option to get a trace file of what mysqld is doing. A typical debug_options string is d:t:o,file_name. The default is d:t:i:o,/tmp/mysqld.trace on Unix and d:t:i:O,\mysqld.trace on Windows.

    Using -DWITH_DEBUG=1 to configure MySQL with debugging support enables you to use the --debug="d,parser_debug" option when you start the server. This causes the Bison parser that is used to process SQL statements to dump a parser trace to the server's standard error output. Typically, this output is written to the error log.

    This option may be given multiple times. Values that begin with + or - are added to or subtracted from the previous value. For example, --debug=T --debug=+P sets the value to P:T.

    For more information, see Section 24.5.3, “The DBUG Package”.

  • --debug-sync-timeout[=N]

    Property Value
    Command-Line Format --debug-sync-timeout[=#]
    Type Integer

    Controls whether the Debug Sync facility for testing and debugging is enabled. Use of Debug Sync requires that MySQL be configured with the -DENABLE_DEBUG_SYNC=1 CMake option (see Section 2.9.7, “MySQL Source-Configuration Options”). If Debug Sync is not compiled in, this option is not available. The option value is a timeout in seconds. The default value is 0, which disables Debug Sync. To enable it, specify a value greater than 0; this value also becomes the default timeout for individual synchronization points. If the option is given without a value, the timeout is set to 300 seconds.

    For a description of the Debug Sync facility and how to use synchronization points, see MySQL Internals: Test Synchronization.

    For additional information about this option, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”.

  • --default-character-set=charset_name

    Property Value
    Command-Line Format --default-character-set=name
    Deprecated Yes (removed in 5.5.3)
    Type String

    Use charset_name as the default character set. This option is deprecated in favor of the character_set_server system variable. See Section 10.15, “Character Set Configuration”. --default-character-set was removed in MySQL 5.5.3.

  • --default-collation=collation_name

    Property Value
    Command-Line Format --default-collation=name
    Deprecated Yes (removed in 5.5.3)
    Type String

    Use collation_name as the default collation. This option is deprecated in favor of the collation_server system variable. See Section 10.15, “Character Set Configuration”. --default-collation was removed in MySQL 5.5.3.

  • --default-time-zone=timezone

    Property Value
    Command-Line Format --default-time-zone=name
    Type String

    Set the default server time zone. This option sets the global time_zone system variable. If this option is not given, the default time zone is the same as the system time zone (given by the value of the system_time_zone system variable.

  • --defaults-extra-file=file_name

    Read this option file after the global option file but (on Unix) before the user option file. If the file does not exist or is otherwise inaccessible, an error occurs. file_name is interpreted relative to the current directory if given as a relative path name rather than a full path name. This must be the first option on the command line if it is used.

    For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”.

  • --defaults-file=file_name

    Read only the given option file. If the file does not exist or is otherwise inaccessible, an error occurs. file_name is interpreted relative to the current directory if given as a relative path name rather than a full path name.

    Note

    This must be the first option on the command line if it is used, except that if the server is started with the --defaults-file and --install (or --install-manual) options, --install (or --install-manual) must be first.

    For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”.

  • --defaults-group-suffix=str

    Read not only the usual option groups, but also groups with the usual names and a suffix of str. For example, mysqld normally reads the [mysqld] group. If the --defaults-group-suffix=_other option is given, mysqld also reads the [mysqld_other] group.

    For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”.

  • --des-key-file=file_name

    Property Value
    Command-Line Format --des-key-file=file_name

    Read the default DES keys from this file. These keys are used by the DES_ENCRYPT() and DES_DECRYPT() functions.

    For additional information about this option, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”.

  • --enable-locking

    This option is deprecated and was removed in MySQL 5.5.3. Use --external-locking instead.

  • --enable-pstack

    Property Value
    Command-Line Format --enable-pstack[={OFF|ON}]
    Deprecated Yes (removed in 5.5.7)
    Type Boolean
    Default Value OFF

    This option is nonfunctional before MySQL 5.5.7 and removed in 5.5.7.

  • --exit-info[=flags], -T [flags]

    Property Value
    Command-Line Format --exit-info[=flags]
    Type Integer

    This is a bitmask of different flags that you can use for debugging the mysqld server. Do not use this option unless you know exactly what it does!

  • --external-locking

    Property Value
    Command-Line Format --external-locking[={OFF|ON}]
    Type Boolean
    Default Value OFF

    Enable external locking (system locking), which is disabled by default. If you use this option on a system on which lockd does not fully work (such as Linux), it is easy for mysqld to deadlock.

    To disable external locking explicitly, use --skip-external-locking.

    External locking affects only MyISAM table access. For more information, including conditions under which it can and cannot be used, see Section 8.11.5, “External Locking”.

  • --flush

    Property Value
    Command-Line Format --flush[={OFF|ON}]
    System Variable flush
    Scope Global
    Dynamic Yes
    Type Boolean
    Default Value OFF

    Flush (synchronize) all changes to disk after each SQL statement. Normally, MySQL does a write of all changes to disk only after each SQL statement and lets the operating system handle the synchronizing to disk. See Section B.4.3.3, “What to Do If MySQL Keeps Crashing”.

    Note

    If --flush is specified, the value of flush_time does not matter and changes to flush_time have no effect on flush behavior.

  • --gdb

    Property Value
    Command-Line Format --gdb[={OFF|ON}]
    Type Boolean
    Default Value OFF

    Install an interrupt handler for SIGINT (needed to stop mysqld with ^C to set breakpoints) and disable stack tracing and core file handling. See Section 24.5, “Debugging and Porting MySQL”.

  • --innodb-xxx

    Set an option for the InnoDB storage engine. The InnoDB options are listed in Section 14.17, “InnoDB Startup Options and System Variables”.

  • --install [service_name]

    Property Value
    Command-Line Format --install [service_name]
    Platform Specific Windows

    (Windows only) Install the server as a Windows service that starts automatically during Windows startup. The default service name is MySQL if no service_name value is given. For more information, see Section 2.3.6.7, “Starting MySQL as a Windows Service”.

    Note

    If the server is started with the --defaults-file and --install options, --install must be first.

  • --install-manual [service_name]

    Property Value
    Command-Line Format --install-manual [service_name]
    Platform Specific Windows

    (Windows only) Install the server as a Windows service that must be started manually. It does not start automatically during Windows startup. The default service name is MySQL if no service_name value is given. For more information, see Section 2.3.6.7, “Starting MySQL as a Windows Service”.

    Note

    If the server is started with the --defaults-file and --install-manual options, --install-manual must be first.

  • --language=lang_name, -L lang_name

    Property Value
    Command-Line Format --language=name
    Deprecated Yes; use lc-messages-dir instead
    System Variable language
    Scope Global
    Dynamic No
    Type Directory name
    Default Value /usr/local/mysql/share/mysql/english/

    The language to use for error messages. lang_name can be given as the language name or as the full path name to the directory where the language files are installed. See Section 10.12, “Setting the Error Message Language”.

    As of MySQL 5.5, --lc-messages-dir and --lc-messages should be used rather than --language, which is deprecated and handled as an alias for --lc-messages-dir.

  • --large-pages

    Property Value
    Command-Line Format --large-pages[={OFF|ON}]
    System Variable large_pages
    Scope Global
    Dynamic No
    Platform Specific Linux
    Type Boolean
    Default Value OFF

    Some hardware/operating system architectures support memory pages greater than the default (usually 4KB). The actual implementation of this support depends on the underlying hardware and operating system. Applications that perform a lot of memory accesses may obtain performance improvements by using large pages due to reduced Translation Lookaside Buffer (TLB) misses.

    MySQL supports the Linux implementation of large page support (which is called HugeTLB in Linux). See Section 8.12.4.2, “Enabling Large Page Support”. For Solaris support of large pages, see the description of the --super-large-pages option.

    --large-pages is disabled by default.

  • --lc-messages=locale_name

    Property Value
    Command-Line Format --lc-messages=name
    System Variable lc_messages
    Scope Global, Session
    Dynamic Yes
    Type String
    Default Value en_US

    The locale to use for error messages. The default is en_US. The server converts the argument to a language name and combines it with the value of --lc-messages-dir to produce the location for the error message file. See Section 10.12, “Setting the Error Message Language”.

  • --lc-messages-dir=dir_name

    Property Value
    Command-Line Format --lc-messages-dir=dir_name
    System Variable lc_messages_dir
    Scope Global
    Dynamic No
    Type Directory name

    The directory where error messages are located. The server uses the value together with the value of --lc-messages to produce the location for the error message file. See Section 10.12, “Setting the Error Message Language”.

  • --local-service

    Property Value
    Command-Line Format --local-service

    (Windows only) A --local-service option following the service name causes the server to run using the LocalService Windows account that has limited system privileges. If both --defaults-file and --local-service are given following the service name, they can be in any order. See Section 2.3.6.7, “Starting MySQL as a Windows Service”.

  • --log[=file_name], -l [file_name]

    Property Value
    Command-Line Format --log[=file_name]
    Deprecated Yes; use general_log instead
    System Variable log
    Scope Global
    Dynamic Yes
    Type File name

    This option enables logging to the general query log, which contains entries that record client connections and SQL statements received from clients. The log output destination can be selected with the log_output system variable. If you omit the file name, MySQL uses host_name.log as the file name. See Section 5.4.1, “Selecting General Query Log and Slow Query Log Output Destinations”, and Section 5.4.3, “The General Query Log”.

    The --log option is deprecated and is removed (along with the log system variable) in MySQL 5.6. Instead, use the general_log system variable to enable the general query log and the general_log_file system variable to set the general query log file name.

  • --log-error[=file_name]

    Property Value
    Command-Line Format --log-error[=file_name]
    System Variable log_error
    Scope Global
    Dynamic No
    Type File name

    Write the error log and startup messages to this file. See Section 5.4.2, “The Error Log”.

    If the option names no file, the error log file name on Unix and Unix-like systems is host_name.err in the data directory. The file name on Windows is the same, unless the --pid-file option is specified. In that case, the file name is the PID file base name with a suffix of .err in the data directory.

    If the option names a file, the error log file has that name (with an .err suffix added if the name has no suffix), located under the data directory unless an absolute path name is given to specify a different location.

    On Windows, --log-error takes precedence over --console if both are given.

  • --log-isam[=file_name]

    Property Value
    Command-Line Format --log-isam[=file_name]
    Type File name

    Log all MyISAM changes to this file (used only when debugging MyISAM).

  • --log-long-format

    Property Value
    Command-Line Format --log-long-format
    Deprecated Yes

    Log extra information to the binary log and slow query log, if they have been activated. For example, the user name and timestamp are logged for all queries. This option is deprecated, as it now represents the default logging behavior. (See the description for --log-short-format.) The log_queries_not_using_indexes system variable can be enabled for the purpose of logging queries that do not use indexes to the slow query log. --log-long-format was removed in MySQL 5.5.3.

  • --log-short-format

    Property Value
    Command-Line Format --log-short-format[={OFF|ON}]
    Type Boolean
    Default Value OFF

    Log less information to the slow query log, if it has been activated.

  • --log-slow-admin-statements

    Property Value
    Command-Line Format --log-slow-admin-statements[={OFF|ON}]
    Type Boolean
    Default Value OFF

    Include slow administrative statements in the statements written to the slow query log. Administrative statements include ALTER TABLE, ANALYZE TABLE, CHECK TABLE, CREATE INDEX, DROP INDEX, OPTIMIZE TABLE, and REPAIR TABLE.

  • --log-tc=file_name

    Property Value
    Command-Line Format --log-tc=file_name
    Type File name
    Default Value tc.log

    The name of the memory-mapped transaction coordinator log file (for XA transactions that affect multiple storage engines when the binary log is disabled). The default name is tc.log. The file is created under the data directory if not given as a full path name. This option is unused.

  • --log-tc-size=size

    Property Value
    Command-Line Format --log-tc-size=#
    Type Integer
    Default Value 24576
    Maximum Value (64-bit platforms, >= 5.5.3) 18446744073709551615
    Maximum Value (64-bit platforms, <= 5.5.2) 18446744073709547520
    Maximum Value (32-bit platforms) 4294967295

    The size in bytes of the memory-mapped transaction coordinator log. The default size is 24KB.

  • --log-warnings[=level], -W [level]

    Property Value
    Command-Line Format --log-warnings[=#]
    System Variable log_warnings
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 1
    Minimum Value 0
    Maximum Value (64-bit platforms, >= 5.5.3) 18446744073709551615
    Maximum Value (64-bit platforms, <= 5.5.2) 18446744073709547520
    Maximum Value (32-bit platforms) 4294967295

    Print out warnings such as Aborted connection... to the error log. This option is enabled (1) by default. To disable it, use --log-warnings=0. Specifying the option without a level value increments the current value by 1. Enabling this option by setting it greater than 0 is recommended, for example, if you use replication (you get more information about what is happening, such as messages about network failures and reconnections). If the value is greater than 1, aborted connections are written to the error log, and access-denied errors for new connection attempts are written. See Section B.4.2.11, “Communication Errors and Aborted Connections”.

    If a slave server was started with --log-warnings enabled, the slave prints messages to the error log to provide information about its status, such as the binary log and relay log coordinates where it starts its job, when it is switching to another relay log, when it reconnects after a disconnect, and so forth. The server logs messages about statements that are unsafe for statement-based logging if --log-warnings is greater than 0.

    The --warnings option was removed in MySQL 5.5.3. It had the same meaning as --log-warnings, which should be used instead.

  • --memlock

    Property Value
    Command-Line Format --memlock[={OFF|ON}]
    Type Boolean
    Default Value OFF

    Lock the mysqld process in memory. This option might help if you have a problem where the operating system is causing mysqld to swap to disk.

    --memlock works on systems that support the mlockall() system call; this includes Solaris, most Linux distributions that use a 2.4 or higher kernel, and perhaps other Unix systems. On Linux systems, you can tell whether or not mlockall() (and thus this option) is supported by checking to see whether or not it is defined in the system mman.h file, like this:

    shell> grep mlockall /usr/include/sys/mman.h
    

    If mlockall() is supported, you should see in the output of the previous command something like the following:

    extern int mlockall (int __flags) __THROW;
    
    Important

    Use of this option may require you to run the server as root, which, for reasons of security, is normally not a good idea. See Section 6.1.5, “How to Run MySQL as a Normal User”.

    On Linux and perhaps other systems, you can avoid the need to run the server as root by changing the limits.conf file. See the notes regarding the memlock limit in Section 8.12.4.2, “Enabling Large Page Support”.

    You must not try to use this option on a system that does not support the mlockall() system call; if you do so, mysqld will very likely crash as soon as you try to start it.

  • --myisam-block-size=N

    Property Value
    Command-Line Format --myisam-block-size=#
    Type Integer
    Default Value 1024
    Minimum Value 1024
    Maximum Value 16384

    The block size to be used for MyISAM index pages.

  • --myisam-recover[=option[,option]...]]

    This option was renamed in MySQL 5.5.3 to the myisam_recover_options system variable. See the description of that variable for more information.

  • --no-defaults

    Do not read any option files. If program startup fails due to reading unknown options from an option file, --no-defaults can be used to prevent them from being read. This must be the first option on the command line if it is used.

    For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”.

  • --old-style-user-limits

    Property Value
    Command-Line Format --old-style-user-limits[={OFF|ON}]
    Type Boolean
    Default Value OFF

    Enable old-style user limits. (Before MySQL 5.0.3, account resource limits were counted separately for each host from which a user connected rather than per account row in the user table.) See Section 6.2.12, “Setting Account Resource Limits”.

  • --one-thread

    Property Value
    Command-Line Format --one-thread

    Only use one thread (for debugging under Linux). This option is available only if the server is built with debugging enabled. See Section 24.5, “Debugging and Porting MySQL”.

    This option is deprecated and is removed in MySQL 5.6. Use --thread_handling=no-threads instead.

  • --partition[=value]

    Property Value
    Command-Line Format --partition[={OFF|ON}]
    Disabled by skip-partition
    Type Boolean
    Default Value ON

    Enables or disables user-defined partitioning support in the MySQL Server.

  • --plugin-load=plugin_list

    Property Value
    Command-Line Format --plugin-load=plugin_list
    System Variable plugin_load
    Scope Global
    Dynamic No
    Type String

    This option tells the server to load the named plugins at startup. All plugins to load must be named in the same --plugin-load option. If multiple --plugin-load options are given, only the last one is used.

    The option value is a semicolon-separated list of name=plugin_library and plugin_library values. Each name is the name of a plugin to load, and plugin_library is the name of the library file that contains the plugin code. If a plugin library is named without any preceding plugin name, the server loads all plugins in the library. The server looks for plugin library files in the directory named by the plugin_dir system variable.

    For example, if plugins named myplug1 and myplug2 have library files myplug1.so and myplug2.so, use this option to perform an early plugin load:

    shell> mysqld --plugin-load="myplug1=myplug1.so;myplug2=myplug2.so"
    

    Quotes are used around the argument value here because otherwise semicolon (;) is interpreted as a special character by some command interpreters. (Unix shells treat it as a command terminator, for example.)

    Each named plugin is loaded for a single invocation of mysqld only. After a restart, the plugin is not loaded unless --plugin-load is used again. This is in contrast to INSTALL PLUGIN, which adds an entry to the mysql.plugins table to cause the plugin to be loaded for every normal server startup.

    Under normal startup, the server determines which plugins to load by reading the mysql.plugins system table. If the server is started with the --skip-grant-tables option, it does not consult the mysql.plugins table and does not load plugins listed there. --plugin-load enables plugins to be loaded even when --skip-grant-tables is given. --plugin-load also enables plugins to be loaded at startup under configurations when plugins cannot be loaded at runtime.

    For additional information about plugin loading, see Section 5.5.1, “Installing and Uninstalling Plugins”.

  • --plugin-xxx

    Specifies an option that pertains to a server plugin. For example, many storage engines can be built as plugins, and for such engines, options for them can be specified with a --plugin prefix. Thus, the --innodb-file-per-table option for InnoDB can be specified as --plugin-innodb-file-per-table.

    For boolean options that can be enabled or disabled, the --skip prefix and other alternative formats are supported as well (see Section 4.2.2.4, “Program Option Modifiers”). For example, --skip-plugin-innodb-file-per-table disables innodb-file-per-table.

    The rationale for the --plugin prefix is that it enables plugin options to be specified unambiguously if there is a name conflict with a built-in server option. For example, were a plugin writer to name a plugin sql and implement a mode option, the option name might be --sql-mode, which would conflict with the built-in option of the same name. In such cases, references to the conflicting name are resolved in favor of the built-in option. To avoid the ambiguity, users can specify the plugin option as --plugin-sql-mode. Use of the --plugin prefix for plugin options is recommended to avoid any question of ambiguity.

  • --port=port_num, -P port_num

    Property Value
    Command-Line Format --port=port_num
    System Variable port
    Scope Global
    Dynamic No
    Type Integer
    Default Value 3306
    Minimum Value 0
    Maximum Value 65535

    The port number to use when listening for TCP/IP connections. On Unix and Unix-like systems, the port number must be 1024 or higher unless the server is started by the root operating system user. Setting this option to 0 causes the default value to be used.

  • --port-open-timeout=num

    Property Value
    Command-Line Format --port-open-timeout=#
    Type Integer
    Default Value 0

    On some systems, when the server is stopped, the TCP/IP port might not become available immediately. If the server is restarted quickly afterward, its attempt to reopen the port can fail. This option indicates how many seconds the server should wait for the TCP/IP port to become free if it cannot be opened. The default is not to wait.

  • --print-defaults

    Print the program name and all options that it gets from option files. This must be the first option on the command line if it is used, except that it may be used immediately after --defaults-file or --defaults-extra-file.

    For additional information about this and other option-file options, see Section 4.2.2.3, “Command-Line Options that Affect Option-File Handling”.

  • --remove [service_name]

    Property Value
    Command-Line Format --remove [service_name]
    Platform Specific Windows

    (Windows only) Remove a MySQL Windows service. The default service name is MySQL if no service_name value is given. For more information, see Section 2.3.6.7, “Starting MySQL as a Windows Service”.

  • --safe-mode

    Property Value
    Command-Line Format --safe-mode
    Deprecated 5.5.26

    Skip some optimization stages. This option is deprecated and is removed in MySQL 5.6.

  • --safe-show-database

    Property Value
    Command-Line Format --safe-show-database[={OFF|ON}]
    Deprecated Yes (removed in 5.5.3)
    Type Boolean

    This option was removed in MySQL 5.5.3. There is a SHOW DATABASES privilege that can be used to control access to database names on a per-account basis. See Section 6.2.2, “Privileges Provided by MySQL”.

  • --safe-user-create

    Property Value
    Command-Line Format --safe-user-create[={OFF|ON}]
    Type Boolean
    Default Value OFF

    If this option is enabled, a user cannot create new MySQL users by using the GRANT statement unless the user has the INSERT privilege for the mysql.user system table or any column in the table. If you want a user to have the ability to create new users that have those privileges that the user has the right to grant, you should grant the user the following privilege:

    GRANT INSERT(user) ON mysql.user TO 'user_name'@'host_name';
    

    This ensures that the user cannot change any privilege columns directly, but has to use the GRANT statement to give privileges to other users.

  • --safemalloc-mem-limit=N

    Property Value
    Command-Line Format --safemalloc-mem-limit=#
    Removed 5.5.6
    Type Integer

    Similate a memory shortage for safemalloc checking.

    safemalloc, along with this option, was removed in MySQL 5.5.6.

  • --skip-grant-tables

    Property Value
    Command-Line Format --skip-grant-tables[={OFF|ON}]
    Type Boolean
    Default Value OFF

    This option causes the server to start without using the privilege system at all, which gives anyone with access to the server unrestricted access to all databases. You can cause a running server to start using the grant tables again by executing mysqladmin flush-privileges or mysqladmin reload command from a system shell, or by issuing a MySQL FLUSH PRIVILEGES statement after connecting to the server.

    This option also causes the server to suppress during its startup sequence the loading of user-defined functions (UDFs), scheduled events, and plugins that were installed with the INSTALL PLUGIN statement. To cause plugins to be loaded anyway, use the --plugin-load option.

    FLUSH PRIVILEGES might be executed implicitly by other actions performed after startup (thus causing the server to start using the grant tables again). For example, mysql_upgrade flushes the privileges during the upgrade procedure.

  • --skip-host-cache

    Property Value
    Command-Line Format --skip-host-cache

    Disable use of the internal host cache for faster name-to-IP resolution. With the cache disabled, the server performs a DNS lookup every time a client connects.

    For more information about how the host cache works, see Section 8.12.5.2, “DNS Lookup Optimization and the Host Cache”.

  • --skip-innodb

    Disable the InnoDB storage engine. In this case, if the default storage engine is InnoDB, the server will not start unless you also change the default_storage_engine system variable to set the default to some other available engine.

  • --skip-new

    Property Value
    Command-Line Format --skip-new

    This option disables (what used to be considered) new, possibly unsafe behaviors. It results in these settings: delay_key_write=OFF, concurrent_insert=NEVER, automatic_sp_privileges=OFF. It also causes OPTIMIZE TABLE to be mapped to ALTER TABLE for storage engines for which OPTIMIZE TABLE is not supported.

  • --skip-partition

    Property Value
    Command-Line Format

    --skip-partition

    --disable-partition

    Disables user-defined partitioning. Partitioned tables can be seen using SHOW TABLES or by querying the INFORMATION_SCHEMA.TABLES table, but cannot be created or modified, nor can data in such tables be accessed. All partition-specific columns in the INFORMATION_SCHEMA.PARTITIONS table display NULL.

    Since DROP TABLE removes table definition (.frm) files, this statement works on partitioned tables even when partitioning is disabled using the option. The statement, however, does not remove .par files associated with partitioned tables in such cases. For this reason, you should avoid dropping partitioned tables with partitioning disabled, or take action to remove the orphaned .par files manually.

  • --skip-safemalloc

    Property Value
    Command-Line Format --skip-safemalloc
    Removed 5.5.6

    Previously, if MySQL was configured with full debugging support, all MySQL programs check for memory overruns during each memory allocation and memory freeing operation. This checking is very slow, so for the server you can avoid it when you do not need it by using the --skip-safemalloc option.

    safemalloc, along with this option, was removed in MySQL 5.5.6.

  • --skip-show-database

    Property Value
    Command-Line Format --skip-show-database
    System Variable skip_show_database
    Scope Global
    Dynamic No

    This option sets the skip_show_database system variable that controls who is permitted to use the SHOW DATABASES statement. See Section 5.1.7, “Server System Variables”.

  • --skip-stack-trace

    Property Value
    Command-Line Format --skip-stack-trace

    Do not write stack traces. This option is useful when you are running mysqld under a debugger. On some systems, you also must use this option to get a core file. See Section 24.5, “Debugging and Porting MySQL”.

  • --skip-thread-priority

    Property Value
    Command-Line Format --skip-thread-priority
    Deprecated Yes

    Disable using thread priorities for faster response time. This option is deprecated and is removed in MySQL 5.6.

  • --slow-start-timeout=timeout

    Property Value
    Command-Line Format --slow-start-timeout=#
    Introduced 5.5.20
    Type Integer
    Default Value 15000

    This option controls the Windows service control manager's service start timeout. The value is the maximum number of milliseconds that the service control manager waits before trying to kill the windows service during startup. The default value is 15000 (15 seconds). If the MySQL service takes too long to start, you may need to increase this value. A value of 0 means there is no timeout.

  • --socket=path

    Property Value
    Command-Line Format --socket={file_name|pipe_name}
    System Variable socket
    Scope Global
    Dynamic No
    Type String
    Default Value (Other) /tmp/mysql.sock
    Default Value (Windows) MySQL

    On Unix, this option specifies the Unix socket file to use when listening for local connections. The default value is /tmp/mysql.sock. If this option is given, the server creates the file in the data directory unless an absolute path name is given to specify a different directory. On Windows, the option specifies the pipe name to use when listening for local connections that use a named pipe. The default value is MySQL (not case sensitive).

  • --sql-mode=value[,value[,value...]]

    Property Value
    Command-Line Format --sql-mode=name
    System Variable sql_mode
    Scope Global, Session
    Dynamic Yes
    Type Set
    Default Value ''
    Valid Values

    ALLOW_INVALID_DATES

    ANSI_QUOTES

    ERROR_FOR_DIVISION_BY_ZERO

    HIGH_NOT_PRECEDENCE

    IGNORE_SPACE

    NO_AUTO_CREATE_USER

    NO_AUTO_VALUE_ON_ZERO

    NO_BACKSLASH_ESCAPES

    NO_DIR_IN_CREATE

    NO_ENGINE_SUBSTITUTION

    NO_FIELD_OPTIONS

    NO_KEY_OPTIONS

    NO_TABLE_OPTIONS

    NO_UNSIGNED_SUBTRACTION

    NO_ZERO_DATE

    NO_ZERO_IN_DATE

    ONLY_FULL_GROUP_BY

    PAD_CHAR_TO_FULL_LENGTH

    PIPES_AS_CONCAT

    REAL_AS_FLOAT

    STRICT_ALL_TABLES

    STRICT_TRANS_TABLES

    Set the SQL mode. See Section 5.1.10, “Server SQL Modes”.

    Note

    MySQL installation programs may configure the SQL mode during the installation process. If the SQL mode differs from the default or from what you expect, check for a setting in an option file that the server reads at startup.

  • --ssl*

    Options that begin with --ssl specify whether to permit clients to connect using SSL and indicate where to find SSL keys and certificates. See Command Options for Encrypted Connections.

  • --standalone

    Property Value
    Command-Line Format --standalone
    Platform Specific Windows

    Available on Windows only; instructs the MySQL server not to run as a service.

  • --super-large-pages

    Property Value
    Command-Line Format --super-large-pages[={OFF|ON}]
    Introduced 5.5.3
    Platform Specific Solaris
    Type Boolean
    Default Value OFF

    Standard use of large pages in MySQL attempts to use the largest size supported, up to 4MB. Under Solaris, a super large pages feature enables uses of pages up to 256MB. This feature is available for recent SPARC platforms. It can be enabled or disabled by using the --super-large-pages or --skip-super-large-pages option.

  • --symbolic-links, --skip-symbolic-links

    Property Value
    Command-Line Format --symbolic-links[={OFF|ON}]
    Type Boolean
    Default Value ON

    Enable or disable symbolic link support. This option has different effects on Windows and Unix:

    The --skip-symlink and --use-symbolic-links server options were removed in MySQL 5.5.3. They had the same meanings as --skip-symbolic-links and --symbolic-links, which should be used instead.

  • --sysdate-is-now

    Property Value
    Command-Line Format --sysdate-is-now[={OFF|ON}]
    Type Boolean
    Default Value OFF

    SYSDATE() by default returns the time at which it executes, not the time at which the statement in which it occurs begins executing. This differs from the behavior of NOW(). This option causes SYSDATE() to be an alias for NOW(). For information about the implications for binary logging and replication, see the description for SYSDATE() in Section 12.7, “Date and Time Functions” and for SET TIMESTAMP in Section 5.1.7, “Server System Variables”.

  • --tc-heuristic-recover={COMMIT|ROLLBACK}

    Property Value
    Command-Line Format --tc-heuristic-recover=name
    Type Enumeration
    Default Value COMMIT
    Valid Values

    COMMIT

    ROLLBACK

    The type of decision to use in the heuristic recovery process. To use this option, two or more storage engines that support XA transactions must be installed.

  • --temp-pool

    Property Value
    Command-Line Format --temp-pool[={OFF|ON}]
    Type Boolean
    Default Value (Other) OFF
    Default Value (Linux) ON

    This option is ignored except on Linux. On Linux, it causes most temporary files created by the server to use a small set of names, rather than a unique name for each new file. This works around a problem in the Linux kernel dealing with creating many new files with different names. With the old behavior, Linux seems to leak memory, because it is being allocated to the directory entry cache rather than to the disk cache.

  • --transaction-isolation=level

    Property Value
    Command-Line Format --transaction-isolation=name
    Type Enumeration
    Default Value REPEATABLE-READ
    Valid Values

    READ-UNCOMMITTED

    READ-COMMITTED

    REPEATABLE-READ

    SERIALIZABLE

    Sets the default transaction isolation level. The level value can be READ-UNCOMMITTED, READ-COMMITTED, REPEATABLE-READ, or SERIALIZABLE. See Section 13.3.6, “SET TRANSACTION Statement”.

    The default transaction isolation level can also be set at runtime using the SET TRANSACTION statement or by setting the tx_isolation system variable.

  • --tmpdir=dir_name, -t dir_name

    Property Value
    Command-Line Format --tmpdir=dir_name
    System Variable tmpdir
    Scope Global
    Dynamic No
    Type Directory name

    The path of the directory to use for creating temporary files. It might be useful if your default /tmp directory resides on a partition that is too small to hold temporary tables. This option accepts several paths that are used in round-robin fashion. Paths should be separated by colon characters (:) on Unix and semicolon characters (;) on Windows. If the MySQL server is acting as a replication slave, you should not set --tmpdir to point to a directory on a memory-based file system or to a directory that is cleared when the server host restarts. For more information about the storage location of temporary files, see Section B.4.3.5, “Where MySQL Stores Temporary Files”. A replication slave needs some of its temporary files to survive a machine restart so that it can replicate temporary tables or LOAD DATA operations. If files in the temporary file directory are lost when the server restarts, replication fails.

  • --user={user_name|user_id}, -u {user_name|user_id}

    Property Value
    Command-Line Format --user=name
    Type String

    Run the mysqld server as the user having the name user_name or the numeric user ID user_id. (User in this context refers to a system login account, not a MySQL user listed in the grant tables.)

    This option is mandatory when starting mysqld as root. The server changes its user ID during its startup sequence, causing it to run as that particular user rather than as root. See Section 6.1.1, “Security Guidelines”.

    To avoid a possible security hole where a user adds a --user=root option to a my.cnf file (thus causing the server to run as root), mysqld uses only the first --user option specified and produces a warning if there are multiple --user options. Options in /etc/my.cnf and $MYSQL_HOME/my.cnf are processed before command-line options, so it is recommended that you put a --user option in /etc/my.cnf and specify a value other than root. The option in /etc/my.cnf is found before any other --user options, which ensures that the server runs as a user other than root, and that a warning results if any other --user option is found.

  • --verbose, -v

    Use this option with the --help option for detailed help.

  • --version, -V

    Display version information and exit.

5.1.7 Server System Variables

The MySQL server maintains many system variables that configure its operation. Each system variable has a default value. System variables can be set at server startup using options on the command line or in an option file. Most of them can be changed dynamically at runtime using the SET statement, which enables you to modify operation of the server without having to stop and restart it. You can also use system variable values in expressions.

At runtime, setting a global system variable value requires the SUPER privilege. Setting a session system variable value normally requires no special privileges and can be done by any user, although there are exceptions. For more information, see Section 5.1.8.1, “System Variable Privileges”

There are several ways to see the names and values of system variables:

  • To see the values that a server will use based on its compiled-in defaults and any option files that it reads, use this command:

    mysqld --verbose --help
    
  • To see the values that a server will use based only on its compiled-in defaults, ignoring the settings in any option files, use this command:

    mysqld --no-defaults --verbose --help
    
  • To see the current values used by a running server, use the SHOW VARIABLES statement.

This section provides a description of each system variable. For a system variable summary table, see Section 5.1.4, “Server System Variable Reference”. For more information about manipulation of system variables, see Section 5.1.8, “Using System Variables”.

For additional system variable information, see these sections:

Note

Some of the following variable descriptions refer to enabling or disabling a variable. These variables can be enabled with the SET statement by setting them to ON or 1, or disabled by setting them to OFF or 0. However, before MySQL 5.5.10, to set such a variable on the command line or in an option file, you must set it to 1 or 0; setting it to ON or OFF will not work. For example, on the command line, --delay_key_write=1 works but --delay_key_write=ON does not. As of MySQL 5.5.10, boolean variables can be set at startup to the values ON, TRUE, OFF, and FALSE (not case-sensitive). See Section 4.2.2.4, “Program Option Modifiers”.

Some system variables control the size of buffers or caches. For a given buffer, the server might need to allocate internal data structures. These structures typically are allocated from the total memory allocated to the buffer, and the amount of space required might be platform dependent. This means that when you assign a value to a system variable that controls a buffer size, the amount of space actually available might differ from the value assigned. In some cases, the amount might be less than the value assigned. It is also possible that the server will adjust a value upward. For example, if you assign a value of 0 to a variable for which the minimal value is 1024, the server will set the value to 1024.

Values for buffer sizes, lengths, and stack sizes are given in bytes unless otherwise specified.

Some system variables take file name values. Unless otherwise specified, the default file location is the data directory if the value is a relative path name. To specify the location explicitly, use an absolute path name. Suppose that the data directory is /var/mysql/data. If a file-valued variable is given as a relative path name, it will be located under /var/mysql/data. If the value is an absolute path name, its location is as given by the path name.

  • authentication_windows_log_level

    Property Value
    Command-Line Format --authentication-windows-log-level=#
    Introduced 5.5.16
    System Variable authentication_windows_log_level
    Scope Global
    Dynamic No
    Type Integer
    Default Value 2
    Minimum Value 0
    Maximum Value 4

    This variable is available only if the authentication_windows Windows authentication plugin is enabled and debugging code is enabled. See Section 6.4.1.5, “Windows Pluggable Authentication”.

    This variable sets the logging level for the Windows authentication plugin. The following table shows the permitted values.

    Value Description
    0 No logging
    1 Log only error messages
    2 Log level 1 messages and warning messages
    3 Log level 2 messages and information notes
    4 Log level 3 messages and debug messages

    This variable was added in MySQL 5.5.16.

  • authentication_windows_use_principal_name

    Property Value
    Command-Line Format --authentication-windows-use-principal-name[={OFF|ON}]
    Introduced 5.5.16
    System Variable authentication_windows_use_principal_name
    Scope Global
    Dynamic No
    Type Boolean
    Default Value ON

    This variable is available only if the authentication_windows Windows authentication plugin is enabled. See Section 6.4.1.5, “Windows Pluggable Authentication”.

    A client that authenticates using the InitSecurityContext() function should provide a string identifying the service to which it connects (targetName). MySQL uses the principal name (UPN) of the account under which the server is running. The UPN has the form user_id@computer_name and need not be registered anywhere to be used. This UPN is sent by the server at the beginning of authentication handshake.

    This variable controls whether the server sends the UPN in the initial challenge. By default, the variable is enabled. For security reasons, it can be disabled to avoid sending the server's account name to a client as cleartext. If the variable is disabled, the server always sends a 0x00 byte in the first challenge, the client does not specify targetName, and as a result, NTLM authentication is used.

    If the server fails to obtain its UPN (which will happen primarily in environments that do not support Kerberos authentication), the UPN is not sent by the server and NTLM authentication is used.

    This variable was added in MySQL 5.5.16.

  • autocommit

    Property Value
    Command-Line Format --autocommit[={OFF|ON}] (>= 5.5.8)
    System Variable autocommit
    Scope (>= 5.5.3) Global, Session
    Scope (<= 5.5.2) Session
    Dynamic Yes
    Type Boolean
    Default Value ON

    The autocommit mode. If set to 1, all changes to a table take effect immediately. If set to 0, you must use COMMIT to accept a transaction or ROLLBACK to cancel it. If autocommit is 0 and you change it to 1, MySQL performs an automatic COMMIT of any open transaction. Another way to begin a transaction is to use a START TRANSACTION or BEGIN statement. See Section 13.3.1, “START TRANSACTION, COMMIT, and ROLLBACK Statements”.

    By default, client connections begin with autocommit set to 1. To cause clients to begin with a default of 0, set the global autocommit value by starting the server with the --autocommit=0 option. To set the variable using an option file, include these lines:

    [mysqld]
    autocommit=0
    

    The init_connect variable can also be set on the command line or in an option file. To set the variable as just shown using an option file, include these lines:

    [mysqld]
    init_connect='SET autocommit=0'
    

    For users that have the SUPER privilege, the content of init_connect is not executed (unlike the effect of setting the global autocommit value at startup).

  • automatic_sp_privileges

    Property Value
    Command-Line Format --automatic-sp-privileges[={OFF|ON}]
    System Variable automatic_sp_privileges
    Scope Global
    Dynamic Yes
    Type Boolean
    Default Value ON

    When this variable has a value of 1 (the default), the server automatically grants the EXECUTE and ALTER ROUTINE privileges to the creator of a stored routine, if the user cannot already execute and alter or drop the routine. (The ALTER ROUTINE privilege is required to drop the routine.) The server also automatically drops those privileges from the creator when the routine is dropped. If automatic_sp_privileges is 0, the server does not automatically add or drop these privileges.

    The creator of a routine is the account used to execute the CREATE statement for it. This might not be the same as the account named as the DEFINER in the routine definition.

    If you start mysqld with --skip-new, automatic_sp_privileges is set to OFF.

    See also Section 20.2.2, “Stored Routines and MySQL Privileges”.

  • back_log

    Property Value
    Command-Line Format --back-log=#
    System Variable back_log
    Scope Global
    Dynamic No
    Type Integer
    Default Value 50
    Minimum Value 1
    Maximum Value 65535

    The number of outstanding connection requests MySQL can have. This comes into play when the main MySQL thread gets very many connection requests in a very short time. It then takes some time (although very little) for the main thread to check the connection and start a new thread. The back_log value indicates how many requests can be stacked during this short time before MySQL momentarily stops answering new requests. You need to increase this only if you expect a large number of connections in a short period of time.

    In other words, this value is the size of the listen queue for incoming TCP/IP connections. Your operating system has its own limit on the size of this queue. The manual page for the Unix listen() system call should have more details. Check your OS documentation for the maximum value for this variable. back_log cannot be set higher than your operating system limit.

  • basedir

    Property Value
    Command-Line Format --basedir=dir_name
    System Variable basedir
    Scope Global
    Dynamic No
    Type Directory name
    Default Value configuration-dependent default

    The path to the MySQL installation base directory.

  • big_tables

    Property Value
    Command-Line Format --big-tables[={OFF|ON}]
    System Variable big_tables
    Scope (>= 5.5.3) Global, Session
    Scope (<= 5.5.2) Session
    Dynamic Yes
    Type Boolean
    Default Value OFF

    If enabled, the server stores all temporary tables on disk rather than in memory. This prevents most The table tbl_name is full errors for SELECT operations that require a large temporary table, but also slows down queries for which in-memory tables would suffice.

    The default value for new connection is OFF (use in-memory temporary tables). Normally, it should never be necessary to enable this variable because the server is able to handle large result sets automatically by using memory for small temporary tables and switching to disk-based tables as required.

    Note

    This variable was formerly named sql_big_tables.

  • bulk_insert_buffer_size

    Property Value
    Command-Line Format --bulk-insert-buffer-size=#
    System Variable bulk_insert_buffer_size
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 8388608
    Minimum Value 0
    Maximum Value (64-bit platforms, >= 5.5.3) 18446744073709551615
    Maximum Value (64-bit platforms, <= 5.5.2) 18446744073709547520
    Maximum Value (32-bit platforms) 4294967295

    MyISAM uses a special tree-like cache to make bulk inserts faster for INSERT ... SELECT, INSERT ... VALUES (...), (...), ..., and LOAD DATA when adding data to nonempty tables. This variable limits the size of the cache tree in bytes per thread. Setting it to 0 disables this optimization. The default value is 8MB.

  • character_set_client

    Property Value
    System Variable character_set_client
    Scope Global, Session
    Dynamic Yes
    Type String
    Default Value utf8

    The character set for statements that arrive from the client. The session value of this variable is set using the character set requested by the client when the client connects to the server. (Many clients support a --default-character-set option to enable this character set to be specified explicitly. See also Section 10.4, “Connection Character Sets and Collations”.) The global value of the variable is used to set the session value in cases when the client-requested value is unknown or not available, or the server is configured to ignore client requests:

    • The client requests a character set not known to the server. For example, a Japanese-enabled client requests sjis when connecting to a server not configured with sjis support.

    • The client is from a version of MySQL older than MySQL 4.1, and thus does not request a character set.

    • mysqld was started with the --skip-character-set-client-handshake option, which causes it to ignore client character set configuration. This reproduces MySQL 4.0 behavior and is useful should you wish to upgrade the server without upgrading all the clients.

    Some character sets cannot be used as the client character set. Attempting to use them as the character_set_client value produces an error. See Impermissible Client Character Sets.

  • character_set_connection

    Property Value
    System Variable character_set_connection
    Scope Global, Session
    Dynamic Yes
    Type String
    Default Value utf8

    The character set used for literals specified without a character set introducer and for number-to-string conversion. For information about introducers, see Section 10.3.8, “Character Set Introducers”.

  • character_set_database

    Property Value
    System Variable character_set_database
    Scope Global, Session
    Dynamic Yes
    Type String
    Default Value latin1
    Footnote This option is dynamic, but only the server should set this information. You should not set the value of this variable manually.

    The character set used by the default database. The server sets this variable whenever the default database changes. If there is no default database, the variable has the same value as character_set_server.

  • character_set_filesystem

    Property Value
    Command-Line Format --character-set-filesystem=name
    System Variable character_set_filesystem
    Scope Global, Session
    Dynamic Yes
    Type String
    Default Value binary

    The file system character set. This variable is used to interpret string literals that refer to file names, such as in the LOAD DATA and SELECT ... INTO OUTFILE statements and the LOAD_FILE() function. Such file names are converted from character_set_client to character_set_filesystem before the file opening attempt occurs. The default value is binary, which means that no conversion occurs. For systems on which multibyte file names are permitted, a different value may be more appropriate. For example, if the system represents file names using UTF-8, set character_set_filesystem to 'utf8mb4'.

  • character_set_results

    Property Value
    System Variable character_set_results
    Scope Global, Session
    Dynamic Yes
    Type String
    Default Value utf8

    The character set used for returning query results to the client. This includes result data such as column values, result metadata such as column names, and error messages.

  • character_set_server

    Property Value
    Command-Line Format --character-set-server=name
    System Variable character_set_server
    Scope Global, Session
    Dynamic Yes
    Type String
    Default Value latin1

    The servers default character set. See Section 10.15, “Character Set Configuration”. If you set this variable, you should also set collation_server to specify the collation for the character set.

  • character_set_system

    Property Value
    System Variable character_set_system
    Scope Global
    Dynamic No
    Type String
    Default Value utf8

    The character set used by the server for storing identifiers. The value is always utf8.

  • character_sets_dir

    Property Value
    Command-Line Format --character-sets-dir=dir_name
    System Variable character_sets_dir
    Scope Global
    Dynamic No
    Type Directory name

    The directory where character sets are installed. See Section 10.15, “Character Set Configuration”.

  • collation_connection

    Property Value
    System Variable collation_connection
    Scope Global, Session
    Dynamic Yes
    Type String

    The collation of the connection character set. collation_connection is important for comparisons of literal strings. For comparisons of strings with column values, collation_connection does not matter because columns have their own collation, which has a higher collation precedence (see Section 10.8.4, “Collation Coercibility in Expressions”).

  • collation_database

    Property Value
    System Variable collation_database
    Scope Global, Session
    Dynamic Yes
    Type String
    Default Value latin1_swedish_ci
    Footnote This option is dynamic, but only the server should set this information. You should not set the value of this variable manually.

    The collation used by the default database. The server sets this variable whenever the default database changes. If there is no default database, the variable has the same value as collation_server.

  • collation_server

    Property Value
    Command-Line Format --collation-server=name
    System Variable collation_server
    Scope Global, Session
    Dynamic Yes
    Type String
    Default Value latin1_swedish_ci

    The server's default collation. See Section 10.15, “Character Set Configuration”.

  • completion_type

    Property Value
    Command-Line Format --completion-type=#
    System Variable completion_type
    Scope Global, Session
    Dynamic Yes
    Type (>= 5.5.3) Enumeration
    Type (<= 5.5.2) Integer
    Default Value (>= 5.5.3) NO_CHAIN
    Default Value (<= 5.5.2) 0
    Valid Values (>= 5.5.3)

    NO_CHAIN

    CHAIN

    RELEASE

    0

    1

    2

    Valid Values (<= 5.5.2)

    0

    1

    2

    The transaction completion type. This variable can take the values shown in the following table.

    Value Description
    NO_CHAIN (or 0) COMMIT and ROLLBACK are unaffected. This is the default value.
    CHAIN (or 1) COMMIT and ROLLBACK are equivalent to COMMIT AND CHAIN and ROLLBACK AND CHAIN, respectively. (A new transaction starts immediately with the same isolation level as the just-terminated transaction.)
    RELEASE (or 2) COMMIT and ROLLBACK are equivalent to COMMIT RELEASE and ROLLBACK RELEASE, respectively. (The server disconnects after terminating the transaction.)

    completion_type affects transactions that begin with START TRANSACTION or BEGIN and end with COMMIT or ROLLBACK. It does not apply to implicit commits resulting from execution of the statements listed in Section 13.3.3, “Statements That Cause an Implicit Commit”. It also does not apply for XA COMMIT, XA ROLLBACK, or when autocommit=1.

  • concurrent_insert

    Property Value
    Command-Line Format --concurrent-insert[=value]
    System Variable concurrent_insert
    Scope Global
    Dynamic Yes
    Type (>= 5.5.3) Enumeration
    Type (<= 5.5.2) Integer
    Default Value (>= 5.5.3) AUTO
    Default Value (<= 5.5.2) 1
    Valid Values (>= 5.5.3)

    NEVER

    AUTO

    ALWAYS

    0

    1

    2

    Valid Values (<= 5.5.2)

    0

    1

    2

    If AUTO (the default), MySQL permits INSERT and SELECT statements to run concurrently for MyISAM tables that have no free blocks in the middle of the data file.

    This variable can take the values shown in the following table.

    Value Description
    NEVER (or 0) Disables concurrent inserts
    AUTO (or 1) (Default) Enables concurrent insert for MyISAM tables that do not have holes
    ALWAYS (or 2) Enables concurrent inserts for all MyISAM tables, even those that have holes. For a table with a hole, new rows are inserted at the end of the table if it is in use by another thread. Otherwise, MySQL acquires a normal write lock and inserts the row into the hole.

    If you start mysqld with --skip-new, concurrent_insert is set to NEVER.

    See also Section 8.11.3, “Concurrent Inserts”.

  • connect_timeout

    Property Value
    Command-Line Format --connect-timeout=#
    System Variable connect_timeout
    Scope Global
    Dynamic Yes
    Type Integer
    Default Value 10
    Minimum Value 2
    Maximum Value 31536000

    The number of seconds that the mysqld server waits for a connect packet before responding with Bad handshake. The default value is 10 seconds.

    Increasing the connect_timeout value might help if clients frequently encounter errors of the form Lost connection to MySQL server at 'XXX', system error: errno.

  • datadir

    Property Value
    Command-Line Format --datadir=dir_name
    System Variable datadir
    Scope Global
    Dynamic No
    Type Directory name

    The path to the MySQL server data directory. Relative paths are resolved with respect to the current directory. If the server will be started automatically (that is, in contexts for which you cannot assume what the current directory will be), it is best to specify the datadir value as an absolute path.

  • date_format

    This variable is unused.

  • datetime_format

    This variable is unused.

  • debug

    Property Value
    Command-Line Format --debug[=debug_options]
    System Variable debug
    Scope Global, Session
    Dynamic Yes
    Type String
    Default Value (Windows) d:t:i:O,\mysqld.trace
    Default Value (Unix) d:t:i:o,/tmp/mysqld.trace

    This variable indicates the current debugging settings. It is available only for servers built with debugging support. The initial value comes from the value of instances of the --debug option given at server startup. The global and session values may be set at runtime.

    Setting the session value of this system variable is a restricted operation. The session user must have privileges sufficient to set restricted session variables. See Section 5.1.8.1, “System Variable Privileges”.

    Assigning a value that begins with + or - cause the value to added to or subtracted from the current value:

    mysql> SET debug = 'T';
    mysql> SELECT @@debug;
    +---------+
    | @@debug |
    +---------+
    | T       |
    +---------+
    
    mysql> SET debug = '+P';
    mysql> SELECT @@debug;
    +---------+
    | @@debug |
    +---------+
    | P:T     |
    +---------+
    
    mysql> SET debug = '-P';
    mysql> SELECT @@debug;
    +---------+
    | @@debug |
    +---------+
    | T       |
    +---------+
    

    For more information, see Section 24.5.3, “The DBUG Package”.

  • debug_sync

    Property Value
    System Variable debug_sync
    Scope (>= 5.5.3) Session
    Scope (<= 5.5.2) Global, Session
    Dynamic Yes
    Type String

    This variable is the user interface to the Debug Sync facility. Use of Debug Sync requires that MySQL be configured with the -DENABLE_DEBUG_SYNC=1 CMake option (see Section 2.9.7, “MySQL Source-Configuration Options”). If Debug Sync is not compiled in, this system variable is not available.

    The global variable value is read only and indicates whether the facility is enabled. By default, Debug Sync is disabled and the value of debug_sync is OFF. If the server is started with --debug-sync-timeout=N, where N is a timeout value greater than 0, Debug Sync is enabled and the value of debug_sync is ON - current signal followed by the signal name. Also, N becomes the default timeout for individual synchronization points.

    The session value can be read by any user and will have the same value as the global variable. The session value can be set to control synchronization points.

    Setting the session value of this system variable is a restricted operation. The session user must have privileges sufficient to set restricted session variables. See Section 5.1.8.1, “System Variable Privileges”.

    For a description of the Debug Sync facility and how to use synchronization points, see MySQL Internals: Test Synchronization.

  • default_storage_engine

    Property Value
    Command-Line Format --default-storage-engine=name
    System Variable (>= 5.5.3) default_storage_engine
    System Variable (<= 5.5.2) storage_engine
    Scope Global, Session
    Dynamic Yes
    Type Enumeration
    Default Value (>= 5.5.5) InnoDB
    Default Value (<= 5.5.4) MyISAM

    The default storage engine for tables. See Chapter 15, Alternative Storage Engines.

    To see which storage engines are available and enabled, use the SHOW ENGINES statement or query the INFORMATION_SCHEMA ENGINES table.

    If you disable the default storage engine at server startup, you must set the default engine to a different engine or the server will not start.

    This variable is to be used in preference to storage_engine, which is now deprecated.

  • default_week_format

    Property Value
    Command-Line Format --default-week-format=#
    System Variable default_week_format
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 0
    Minimum Value 0
    Maximum Value 7

    The default mode value to use for the WEEK() function. See Section 12.7, “Date and Time Functions”.

  • delay_key_write

    Property Value
    Command-Line Format --delay-key-write[={OFF|ON|ALL}]
    System Variable delay_key_write
    Scope Global
    Dynamic Yes
    Type Enumeration
    Default Value ON
    Valid Values

    ON

    OFF

    ALL

    This variable specifies how to use delayed key writes. It applies only to MyISAM tables. Delayed key writing causes key buffers not to be flushed between writes. See also Section 15.3.1, “MyISAM Startup Options”.

    This variable can have one of the following values to affect handling of the DELAY_KEY_WRITE table option that can be used in CREATE TABLE statements.

    Option Description
    OFF DELAY_KEY_WRITE is ignored.
    ON MySQL honors any DELAY_KEY_WRITE option specified in CREATE TABLE statements. This is the default value.
    ALL All new opened tables are treated as if they were created with the DELAY_KEY_WRITE option enabled.
    Note

    If you set this variable to ALL, you should not use MyISAM tables from within another program (such as another MySQL server or myisamchk) when the tables are in use. Doing so leads to index corruption.

    If DELAY_KEY_WRITE is enabled for a table, the key buffer is not flushed for the table on every index update, but only when the table is closed. This speeds up writes on keys a lot, but if you use this feature, you should add automatic checking of all MyISAM tables by starting the server with the myisam_recover_options system variable set (for example, myisam_recover_options='BACKUP,FORCE'). See Section 5.1.7, “Server System Variables”, and Section 15.3.1, “MyISAM Startup Options”.

    If you start mysqld with --skip-new, delay_key_write is set to OFF.

    Warning

    If you enable external locking with --external-locking, there is no protection against index corruption for tables that use delayed key writes.

  • delayed_insert_limit

    Property Value
    Command-Line Format --delayed-insert-limit=#
    System Variable delayed_insert_limit
    Scope Global
    Dynamic Yes
    Type Integer
    Default Value 100
    Minimum Value 1
    Maximum Value (64-bit platforms, >= 5.5.3) 18446744073709551615
    Maximum Value (64-bit platforms, <= 5.5.2) 18446744073709547520
    Maximum Value (32-bit platforms) 4294967295

    After inserting delayed_insert_limit delayed rows, the INSERT DELAYED handler thread checks whether there are any SELECT statements pending. If so, it permits them to execute before continuing to insert delayed rows.

  • delayed_insert_timeout

    Property Value
    Command-Line Format --delayed-insert-timeout=#
    System Variable delayed_insert_timeout
    Scope Global
    Dynamic Yes
    Type Integer
    Default Value 300

    How many seconds an INSERT DELAYED handler thread should wait for INSERT statements before terminating.

  • delayed_queue_size

    Property Value
    Command-Line Format --delayed-queue-size=#
    System Variable delayed_queue_size
    Scope Global
    Dynamic Yes
    Type Integer
    Default Value 1000
    Minimum Value 1
    Maximum Value (64-bit platforms, >= 5.5.3) 18446744073709551615
    Maximum Value (64-bit platforms, <= 5.5.2) 18446744073709547520
    Maximum Value (32-bit platforms) 4294967295

    This is a per-table limit on the number of rows to queue when handling INSERT DELAYED statements. If the queue becomes full, any client that issues an INSERT DELAYED statement waits until there is room in the queue again.

  • div_precision_increment

    Property Value
    Command-Line Format --div-precision-increment=#
    System Variable div_precision_increment
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 4
    Minimum Value 0
    Maximum Value 30

    This variable indicates the number of digits by which to increase the scale of the result of division operations performed with the / operator. The default value is 4. The minimum and maximum values are 0 and 30, respectively. The following example illustrates the effect of increasing the default value.

    mysql> SELECT 1/7;
    +--------+
    | 1/7    |
    +--------+
    | 0.1429 |
    +--------+
    mysql> SET div_precision_increment = 12;
    mysql> SELECT 1/7;
    +----------------+
    | 1/7            |
    +----------------+
    | 0.142857142857 |
    +----------------+
    
  • engine_condition_pushdown

    Property Value
    Command-Line Format --engine-condition-pushdown[={OFF|ON}]
    Deprecated 5.5.3; use optimizer_switch instead
    System Variable engine_condition_pushdown
    Scope Global, Session
    Dynamic Yes
    Type Boolean
    Default Value ON

    The engine condition pushdown optimization enables processing for certain comparisons to be pushed down to the storage engine level for more efficient execution. For more information, see Section 8.2.1.4, “Engine Condition Pushdown Optimization”.

    Engine condition pushdown is used only by the NDBCLUSTER storage engine. Enabling this optimization on a MySQL Server acting as an NDB Cluster SQL node causes WHERE conditions on unindexed columns to be evaluated on the cluster's data nodes and only the rows that match to be sent back to the SQL node that issued the query. This greatly reduces the amount of cluster data that must be sent over the network, increasing the efficiency with which results are returned.

    The engine_condition_pushdown variable controls whether engine condition pushdown is enabled. By default, this variable is ON (1). Setting it to OFF (0) disables pushdown.

    This variable is deprecated in MySQL 5.5 and is removed in MySQL 5.6. Use the engine_condition_pushdown flag of the optimizer_switch variable instead. See Section 8.9.2, “Switchable Optimizations”.

  • error_count

    The number of errors that resulted from the last statement that generated messages. This variable is read only. See Section 13.7.5.18, “SHOW ERRORS Statement”.

  • event_scheduler

    Property Value
    Command-Line Format --event-scheduler[=value]
    System Variable event_scheduler
    Scope Global
    Dynamic Yes
    Type Enumeration
    Default Value OFF
    Valid Values

    ON

    OFF

    DISABLED

    This variable enables or disables, and starts or stops, the Event Scheduler. The possible status values are ON, OFF, and DISABLED, with the default being OFF. Turning the Event Scheduler OFF is not the same as disabling the Event Scheduler, which requires setting the status to DISABLED. This variable and its effects on the Event Scheduler's operation are discussed in greater detail in Section 20.4.2, “Event Scheduler Configuration”

  • expire_logs_days

    Property Value
    Command-Line Format --expire-logs-days=#
    System Variable expire_logs_days
    Scope Global
    Dynamic Yes
    Type Integer
    Default Value 0
    Minimum Value 0
    Maximum Value 99

    The number of days for automatic binary log file removal. The default is 0, which means no automatic removal. Possible removals happen at startup and when the binary log is flushed. Log flushing occurs as indicated in Section 5.4, “MySQL Server Logs”.

    To remove binary log files manually, use the PURGE BINARY LOGS statement. See Section 13.4.1.1, “PURGE BINARY LOGS Statement”.

  • external_user

    Property Value
    Introduced 5.5.7
    System Variable external_user
    Scope Session
    Dynamic No
    Type String

    The external user name used during the authentication process, as set by the plugin used to authenticate the client. With native (built-in) MySQL authentication, or if the plugin does not set the value, this variable is NULL. See Section 6.2.11, “Proxy Users”.

  • flush

    Property Value
    Command-Line Format --flush[={OFF|ON}]
    System Variable flush
    Scope Global
    Dynamic Yes
    Type Boolean
    Default Value OFF

    If ON, the server flushes (synchronizes) all changes to disk after each SQL statement. Normally, MySQL does a write of all changes to disk only after each SQL statement and lets the operating system handle the synchronizing to disk. See Section B.4.3.3, “What to Do If MySQL Keeps Crashing”. This variable is set to ON if you start mysqld with the --flush option.

    Note

    If flush is enabled, the value of flush_time does not matter and changes to flush_time have no effect on flush behavior.

  • flush_time

    Property Value
    Command-Line Format --flush-time=#
    System Variable flush_time
    Scope Global
    Dynamic Yes
    Type Integer
    Default Value (Other) 0
    Default Value (Windows) 1800
    Minimum Value 0

    If this is set to a nonzero value, all tables are closed every flush_time seconds to free up resources and synchronize unflushed data to disk. This option is best used only on systems with minimal resources.

    Note

    If flush is enabled, the value of flush_time does not matter and changes to flush_time have no effect on flush behavior.

  • foreign_key_checks

    Property Value
    System Variable foreign_key_checks
    Scope (>= 5.5.3) Global, Session
    Scope (<= 5.5.2) Session
    Dynamic Yes
    Type Boolean
    Default Value ON

    If set to 1 (the default), foreign key constraints for InnoDB tables are checked. If set to 0, foreign key constraints are ignored, with a couple of exceptions. When re-creating a table that was dropped, an error is returned if the table definition does not conform to the foreign key constraints referencing the table. Likewise, an ALTER TABLE operation returns an error if a foreign key definition is incorrectly formed. For more information, see Section 13.1.17.6, “FOREIGN KEY Constraints”.

    Disabling foreign key checking can be useful for reloading InnoDB tables in an order different from that required by their parent/child relationships. See Section 13.1.17.6, “FOREIGN KEY Constraints”.

    Setting foreign_key_checks to 0 also affects data definition statements: DROP SCHEMA drops a schema even if it contains tables that have foreign keys that are referred to by tables outside the schema, and DROP TABLE drops tables that have foreign keys that are referred to by other tables.

    Note

    Setting foreign_key_checks to 1 does not trigger a scan of the existing table data. Therefore, rows added to the table while foreign_key_checks=0 will not be verified for consistency.

    Warning

    With foreign_key_checks=0, dropping an index required by a foreign key constraint places the table in an inconsistent state and causes the foreign key check that occurs at table load to fail. To avoid this problem, remove the foreign key constraint before dropping the index (Bug #70260).

  • ft_boolean_syntax

    Property Value
    Command-Line Format --ft-boolean-syntax=name
    System Variable ft_boolean_syntax
    Scope Global
    Dynamic Yes
    Type String
    Default Value + -><()~*:""&|

    The list of operators supported by boolean full-text searches performed using IN BOOLEAN MODE. See Section 12.9.2, “Boolean Full-Text Searches”.

    The default variable value is '+ -><()~*:""&|'. The rules for changing the value are as follows:

    • Operator function is determined by position within the string.

    • The replacement value must be 14 characters.

    • Each character must be an ASCII nonalphanumeric character.

    • Either the first or second character must be a space.

    • No duplicates are permitted except the phrase quoting operators in positions 11 and 12. These two characters are not required to be the same, but they are the only two that may be.

    • Positions 10, 13, and 14 (which by default are set to :, &, and |) are reserved for future extensions.

  • ft_max_word_len

    Property Value
    Command-Line Format --ft-max-word-len=#
    System Variable ft_max_word_len
    Scope Global
    Dynamic No
    Type Integer
    Minimum Value 10

    The maximum length of the word to be included in a FULLTEXT index.

    Note

    FULLTEXT indexes must be rebuilt after changing this variable. Use REPAIR TABLE tbl_name QUICK.

  • ft_min_word_len

    Property Value
    Command-Line Format --ft-min-word-len=#
    System Variable ft_min_word_len
    Scope Global
    Dynamic No
    Type Integer
    Default Value 4
    Minimum Value 1

    The minimum length of the word to be included in a FULLTEXT index.

    Note

    FULLTEXT indexes must be rebuilt after changing this variable. Use REPAIR TABLE tbl_name QUICK.

  • ft_query_expansion_limit

    Property Value
    Command-Line Format --ft-query-expansion-limit=#
    System Variable ft_query_expansion_limit
    Scope Global
    Dynamic No
    Type Integer
    Default Value 20
    Minimum Value 0
    Maximum Value 1000

    The number of top matches to use for full-text searches performed using WITH QUERY EXPANSION.

  • ft_stopword_file

    Property Value
    Command-Line Format --ft-stopword-file=file_name
    System Variable ft_stopword_file
    Scope Global
    Dynamic No
    Type File name

    The file from which to read the list of stopwords for full-text searches. The server looks for the file in the data directory unless an absolute path name is given to specify a different directory. All the words from the file are used; comments are not honored. By default, a built-in list of stopwords is used (as defined in the storage/myisam/ft_static.c file). Setting this variable to the empty string ('') disables stopword filtering. See also Section 12.9.4, “Full-Text Stopwords”.

    Note

    FULLTEXT indexes must be rebuilt after changing this variable or the contents of the stopword file. Use REPAIR TABLE tbl_name QUICK.

  • general_log

    Property Value
    Command-Line Format --general-log[={OFF|ON}]
    System Variable general_log
    Scope Global
    Dynamic Yes
    Type Boolean
    Default Value OFF

    Whether the general query log is enabled. The value can be 0 (or OFF) to disable the log or 1 (or ON) to enable the log. The destination for log output is controlled by the log_output system variable; if that value is NONE, no log entries are written even if the log is enabled.

  • general_log_file

    Property Value
    Command-Line Format --general-log-file=file_name
    System Variable general_log_file
    Scope Global
    Dynamic Yes
    Type File name
    Default Value host_name.log

    The name of the general query log file. The default value is host_name.log, but the initial value can be changed with the --general_log_file option.

  • group_concat_max_len

    Property Value
    Command-Line Format --group-concat-max-len=#
    System Variable group_concat_max_len
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 1024
    Minimum Value 4
    Maximum Value (64-bit platforms, >= 5.5.3) 18446744073709551615
    Maximum Value (64-bit platforms, <= 5.5.2) 18446744073709547520
    Maximum Value (32-bit platforms) 4294967295

    The maximum permitted result length in bytes for the GROUP_CONCAT() function. The default is 1024.

  • have_compress

    YES if the zlib compression library is available to the server, NO if not. If not, the COMPRESS() and UNCOMPRESS() functions cannot be used.

  • have_crypt

    YES if the crypt() system call is available to the server, NO if not. If not, the ENCRYPT() function cannot be used.

  • have_csv

    YES if mysqld supports CSV tables, NO if not.

    This variable is deprecated and is removed in MySQL 5.6. Use SHOW ENGINES instead.

  • have_dynamic_loading

    YES if mysqld supports dynamic loading of plugins, NO if not. If the value is NO, you cannot use options such as --plugin-load to load plugins at server startup, or the INSTALL PLUGIN statement to load plugins at runtime.

  • have_geometry

    YES if the server supports spatial data types, NO if not.

  • have_innodb

    YES if mysqld supports InnoDB tables. DISABLED if --skip-innodb is used.

    This variable is deprecated and is removed in MySQL 5.6. Use SHOW ENGINES instead.

  • have_openssl

    This variable is an alias for have_ssl.

  • have_partitioning

    YES if mysqld supports partitioning.

    This variable is deprecated and is removed in MySQL 5.6. Use SHOW PLUGINS instead. For more information, see Chapter 19, Partitioning.

  • have_profiling

    YES if statement profiling capability is present, NO if not. If present, the profiling system variable controls whether this capability is enabled or disabled. See Section 13.7.5.32, “SHOW PROFILES Statement”.

  • have_query_cache

    YES if mysqld supports the query cache, NO if not.

  • have_rtree_keys

    YES if RTREE indexes are available, NO if not. (These are used for spatial indexes in MyISAM tables.)

  • have_ssl

    Property Value
    System Variable have_ssl
    Scope Global
    Dynamic No
    Type String
    Valid Values (>= 5.5.56)

    YES (SSL support available)

    DISABLED (SSL support was compiled into the server, but the server was not started with the necessary options to enable it)

    Valid Values (<= 5.5.55)

    YES (SSL support available)

    NO (No SSL support was compiled into the server)

    DISABLED (SSL support was compiled into the server, but the server was not started with the necessary options to enable it)

    YES if mysqld supports SSL connections, NO if not. DISABLED indicates that the server was compiled with SSL support, but was not started with the appropriate --ssl-xxx options. For more information, see Section 2.9.6, “Configuring SSL Library Support”. As of MySQL 5.5.56, MySQL must be compiled with SSL support, so NO is not a permitted value.

  • have_symlink

    YES if symbolic link support is enabled, NO if not. This is required on Unix for support of the DATA DIRECTORY and INDEX DIRECTORY table options, and on Windows for support of data directory symlinks. If the server is started with the --skip-symbolic-links option, the value is DISABLED.

  • hostname

    Property Value
    System Variable hostname
    Scope Global
    Dynamic No
    Type String

    The server sets this variable to the server host name at startup.

  • identity

    This variable is a synonym for the last_insert_id variable. It exists for compatibility with other database systems. You can read its value with SELECT @@identity, and set it using SET identity.

  • init_connect

    Property Value
    Command-Line Format --init-connect=name
    System Variable init_connect
    Scope Global
    Dynamic Yes
    Type String

    A string to be executed by the server for each client that connects. The string consists of one or more SQL statements, separated by semicolon characters.

    For users that have the SUPER privilege, the content of init_connect is not executed. This is done so that an erroneous value for init_connect does not prevent all clients from connecting. For example, the value might contain a statement that has a syntax error, thus causing client connections to fail. Not executing init_connect for users that have the SUPER privilege enables them to open a connection and fix the init_connect value.

    The server discards any result sets produced by statements in the value of init_connect.

  • init_file

    Property Value
    Command-Line Format --init-file=file_name
    System Variable init_file
    Scope Global
    Dynamic No
    Type File name

    If specified, this variable names a file containing SQL statements to be read and executed during the startup process. Each statement must be on a single line and should not include comments.

    If the server is started with the --bootstrap option, it operates in bootstap mode and some functionality is unavailable that limits the statements permitted in the file. These include statements that relate to account management (such as CREATE USER or GRANT).

  • innodb_xxx

    InnoDB system variables are listed in Section 14.17, “InnoDB Startup Options and System Variables”. These variables control many aspects of storage, memory use, and I/O patterns for InnoDB tables, and are especially important now that InnoDB is the default storage engine.

  • insert_id

    The value to be used by the following INSERT or ALTER TABLE statement when inserting an AUTO_INCREMENT value. This is mainly used with the binary log.

  • interactive_timeout

    Property Value
    Command-Line Format --interactive-timeout=#
    System Variable interactive_timeout
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 28800
    Minimum Value 1

    The number of seconds the server waits for activity on an interactive connection before closing it. An interactive client is defined as a client that uses the CLIENT_INTERACTIVE option to mysql_real_connect(). See also wait_timeout.

  • join_buffer_size

    Property Value
    Command-Line Format --join-buffer-size=#
    System Variable join_buffer_size
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 131072
    Minimum Value (Other, 64-bit platforms, >= 5.5.3) 128
    Minimum Value (Other, 64-bit platforms, <= 5.5.2) 8228
    Minimum Value (Other, 32-bit platforms, >= 5.5.3) 128
    Minimum Value (Other, 32-bit platforms, <= 5.5.2) 8200
    Minimum Value (Windows, 64-bit platforms, <= 5.5.2) 8228
    Minimum Value (Windows, 32-bit platforms, <= 5.5.2) 8200
    Minimum Value (Windows, >= 5.5.3) 128
    Maximum Value (Other, 64-bit platforms) 18446744073709547520
    Maximum Value (Other, 32-bit platforms) 4294967295
    Maximum Value (Windows, 64-bit platforms, <= 5.5.2) 4294967295
    Maximum Value (Windows, 32-bit platforms, <= 5.5.2) 4294967295
    Maximum Value (Windows, >= 5.5.3) 4294967295

    The minimum size of the buffer that is used for plain index scans, range index scans, and joins that do not use indexes and thus perform full table scans. Normally, the best way to get fast joins is to add indexes. Increase the value of join_buffer_size to get a faster full join when adding indexes is not possible. One join buffer is allocated for each full join between two tables. For a complex join between several tables for which indexes are not used, multiple join buffers might be necessary.

    There is no gain from setting the buffer larger than required to hold each matching row, and all joins allocate at least the minimum size, so use caution in setting this variable to a large value globally. It is better to keep the global setting small and change to a larger setting only in sessions that are doing large joins. Memory allocation time can cause substantial performance drops if the global size is larger than needed by most queries that use it.

    The maximum permissible setting for join_buffer_size is 4GB−1. Larger values are permitted for 64-bit platforms (except 64-bit Windows, for which large values are truncated to 4GB−1 with a warning).

    For additional information about join buffering, see Section 8.2.1.5, “Nested-Loop Join Algorithms”.

  • keep_files_on_create

    Property Value
    Command-Line Format --keep-files-on-create[={OFF|ON}]
    System Variable keep_files_on_create
    Scope Global, Session
    Dynamic Yes
    Type Boolean
    Default Value OFF

    If a MyISAM table is created with no DATA DIRECTORY option, the .MYD file is created in the database directory. By default, if MyISAM finds an existing .MYD file in this case, it overwrites it. The same applies to .MYI files for tables created with no INDEX DIRECTORY option. To suppress this behavior, set the keep_files_on_create variable to ON (1), in which case MyISAM will not overwrite existing files and returns an error instead. The default value is OFF (0).

    If a MyISAM table is created with a DATA DIRECTORY or INDEX DIRECTORY option and an existing .MYD or .MYI file is found, MyISAM always returns an error. It will not overwrite a file in the specified directory.

  • key_buffer_size

    Property Value
    Command-Line Format --key-buffer-size=#
    System Variable key_buffer_size
    Scope Global
    Dynamic Yes
    Type Integer
    Default Value 8388608
    Minimum Value 8
    Maximum Value (64-bit platforms) OS_PER_PROCESS_LIMIT
    Maximum Value (32-bit platforms) 4294967295

    Index blocks for MyISAM tables are buffered and are shared by all threads. key_buffer_size is the size of the buffer used for index blocks. The key buffer is also known as the key cache.

    The maximum permissible setting for key_buffer_size is 4GB−1 on 32-bit platforms. Larger values are permitted for 64-bit platforms. The effective maximum size might be less, depending on your available physical RAM and per-process RAM limits imposed by your operating system or hardware platform. The value of this variable indicates the amount of memory requested. Internally, the server allocates as much memory as possible up to this amount, but the actual allocation might be less.

    You can increase the value to get better index handling for all reads and multiple writes; on a system whose primary function is to run MySQL using the MyISAM storage engine, 25% of the machine's total memory is an acceptable value for this variable. However, you should be aware that, if you make the value too large (for example, more than 50% of the machine's total memory), your system might start to page and become extremely slow. This is because MySQL relies on the operating system to perform file system caching for data reads, so you must leave some room for the file system cache. You should also consider the memory requirements of any other storage engines that you may be using in addition to MyISAM.

    For even more speed when writing many rows at the same time, use LOCK TABLES. See Section 8.2.4.1, “Optimizing INSERT Statements”.

    You can check the performance of the key buffer by issuing a SHOW STATUS statement and examining the Key_read_requests, Key_reads, Key_write_requests, and Key_writes status variables. (See Section 13.7.5, “SHOW Statements”.) The Key_reads/Key_read_requests ratio should normally be less than 0.01. The Key_writes/Key_write_requests ratio is usually near 1 if you are using mostly updates and deletes, but might be much smaller if you tend to do updates that affect many rows at the same time or if you are using the DELAY_KEY_WRITE table option.

    The fraction of the key buffer in use can be determined using key_buffer_size in conjunction with the Key_blocks_unused status variable and the buffer block size, which is available from the key_cache_block_size system variable:

    1 - ((Key_blocks_unused * key_cache_block_size) / key_buffer_size)
    

    This value is an approximation because some space in the key buffer is allocated internally for administrative structures. Factors that influence the amount of overhead for these structures include block size and pointer size. As block size increases, the percentage of the key buffer lost to overhead tends to decrease. Larger blocks results in a smaller number of read operations (because more keys are obtained per read), but conversely an increase in reads of keys that are not examined (if not all keys in a block are relevant to a query).

    It is possible to create multiple MyISAM key caches. The size limit of 4GB applies to each cache individually, not as a group. See Section 8.10.2, “The MyISAM Key Cache”.

  • key_cache_age_threshold

    Property Value
    Command-Line Format --key-cache-age-threshold=#
    System Variable key_cache_age_threshold
    Scope Global
    Dynamic Yes
    Type Integer
    Default Value 300
    Minimum Value 100
    Maximum Value (64-bit platforms, >= 5.5.3) 18446744073709551615
    Maximum Value (64-bit platforms, <= 5.5.2) 18446744073709547520
    Maximum Value (32-bit platforms) 4294967295

    This value controls the demotion of buffers from the hot sublist of a key cache to the warm sublist. Lower values cause demotion to happen more quickly. The minimum value is 100. The default value is 300. See Section 8.10.2, “The MyISAM Key Cache”.

  • key_cache_block_size

    Property Value
    Command-Line Format --key-cache-block-size=#
    System Variable key_cache_block_size
    Scope Global
    Dynamic Yes
    Type Integer
    Default Value 1024
    Minimum Value 512
    Maximum Value 16384

    The size in bytes of blocks in the key cache. The default value is 1024. See Section 8.10.2, “The MyISAM Key Cache”.

  • key_cache_division_limit

    Property Value
    Command-Line Format --key-cache-division-limit=#
    System Variable key_cache_division_limit
    Scope Global
    Dynamic Yes
    Type Integer
    Default Value 100
    Minimum Value 1
    Maximum Value 100

    The division point between the hot and warm sublists of the key cache buffer list. The value is the percentage of the buffer list to use for the warm sublist. Permissible values range from 1 to 100. The default value is 100. See Section 8.10.2, “The MyISAM Key Cache”.

  • language

    Property Value
    Command-Line Format --language=name
    Deprecated Yes; use lc-messages-dir instead
    System Variable language
    Scope Global
    Dynamic No
    Type Directory name
    Default Value /usr/local/mysql/share/mysql/english/

    The directory where error messages are located. See Section 10.12, “Setting the Error Message Language”.

    The language system variable is removed as of MySQL 5.5.0 (although the --language command-line option can still be used). Similar information is available from the lc_messages_dir and lc_messages variables.

  • large_files_support

    Property Value
    System Variable large_files_support
    Scope Global
    Dynamic No

    Whether mysqld was compiled with options for large file support.

  • large_pages

    Property Value
    Command-Line Format --large-pages[={OFF|ON}]
    System Variable large_pages
    Scope Global
    Dynamic No
    Platform Specific Linux
    Type Boolean
    Default Value OFF

    Whether large page support is enabled (via the --large-pages option). See Section 8.12.4.2, “Enabling Large Page Support”.

  • large_page_size

    Property Value
    System Variable large_page_size
    Scope Global
    Dynamic No
    Type Integer
    Default Value 0

    If large page support is enabled, this shows the size of memory pages. Large memory pages are supported only on Linux; on other platforms, the value of this variable is always 0. See Section 8.12.4.2, “Enabling Large Page Support”.

  • last_insert_id

    The value to be returned from LAST_INSERT_ID(). This is stored in the binary log when you use LAST_INSERT_ID() in a statement that updates a table. Setting this variable does not update the value returned by the mysql_insert_id() C API function.

  • lc_messages

    Property Value
    Command-Line Format --lc-messages=name
    System Variable lc_messages
    Scope Global, Session
    Dynamic Yes
    Type String
    Default Value en_US

    The locale to use for error messages. The default is en_US. The server converts the argument to a language name and combines it with the value of lc_messages_dir to produce the location for the error message file. See Section 10.12, “Setting the Error Message Language”.

  • lc_messages_dir

    Property Value
    Command-Line Format --lc-messages-dir=dir_name
    System Variable lc_messages_dir
    Scope Global
    Dynamic No
    Type Directory name

    The directory where error messages are located. The server uses the value together with the value of lc_messages to produce the location for the error message file. See Section 10.12, “Setting the Error Message Language”.

  • lc_time_names

    Property Value
    Command-Line Format --lc-time-names=value
    System Variable lc_time_names
    Scope Global, Session
    Dynamic Yes
    Type String

    This variable specifies the locale that controls the language used to display day and month names and abbreviations. This variable affects the output from the DATE_FORMAT(), DAYNAME() and MONTHNAME() functions. Locale names are POSIX-style values such as 'ja_JP' or 'pt_BR'. The default value is 'en_US' regardless of your system's locale setting. For further information, see Section 10.16, “MySQL Server Locale Support”.

  • license

    Property Value
    System Variable license
    Scope Global
    Dynamic No
    Type String
    Default Value GPL

    The type of license the server has.

  • local_infile

    Property Value
    Command-Line Format --local-infile[={OFF|ON}]
    System Variable local_infile
    Scope Global
    Dynamic Yes
    Type Boolean
    Default Value ON

    This variable controls server-side LOCAL capability for LOAD DATA statements. Depending on the local_infile setting, the server refuses or permits local data loading by clients that have LOCAL enabled on the client side.

    To explicitly cause the server to refuse or permit LOAD DATA LOCAL statements (regardless of how client programs and libraries are configured at build time or runtime), start mysqld with local_infile disabled or enabled, respectively. local_infile can also be set at runtime. For more information, see Section 6.1.6, “Security Issues with LOAD DATA LOCAL”.

  • lock_wait_timeout

    Property Value
    Command-Line Format --lock-wait-timeout=#
    Introduced 5.5.3
    System Variable lock_wait_timeout
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 31536000
    Minimum Value 1
    Maximum Value 31536000

    This variable specifies the timeout in seconds for attempts to acquire metadata locks. The permissible values range from 1 to 31536000 (1 year). The default is 31536000.

    This timeout applies to all statements that use metadata locks. These include DML and DDL operations on tables, views, stored procedures, and stored functions, as well as LOCK TABLES, FLUSH TABLES WITH READ LOCK, and HANDLER statements.

    This timeout does not apply to implicit accesses to system tables in the mysql database, such as grant tables modified by GRANT or REVOKE statements or table logging statements. The timeout does apply to system tables accessed directly, such as with SELECT or UPDATE.

    The timeout value applies separately for each metadata lock attempt. A given statement can require more than one lock, so it is possible for the statement to block for longer than the lock_wait_timeout value before reporting a timeout error. When lock timeout occurs, ER_LOCK_WAIT_TIMEOUT is reported.

    lock_wait_timeout does not apply to delayed inserts, which always execute with a timeout of 1 year. This is done to avoid unnecessary timeouts because a session that issues a delayed insert receives no notification of delayed insert timeouts.

  • locked_in_memory

    Property Value
    System Variable locked_in_memory
    Scope Global
    Dynamic No

    Whether mysqld was locked in memory with --memlock.

  • log

    Property Value
    Command-Line Format --log[=file_name]
    Deprecated Yes; use general_log instead
    System Variable log
    Scope Global
    Dynamic Yes
    Type File name

    Whether logging of all statements to the general query log is enabled. See Section 5.4.3, “The General Query Log”.

    This variable is deprecated and is removed in MySQL 5.6. Use general_log instead.

  • log_error

    Property Value
    Command-Line Format --log-error[=file_name]
    System Variable log_error
    Scope Global
    Dynamic No
    Type File name

    The name of the error log file, or empty if the server is writing error messages to the console rather than to a named file. See Section 5.4.2, “The Error Log”.

  • log_output

    Property Value
    Command-Line Format --log-output=name
    System Variable log_output
    Scope Global
    Dynamic Yes
    Type Set
    Default Value FILE
    Valid Values

    TABLE

    FILE

    NONE

    The destination or destinations for general query log and slow query log output. The value is a list one or more comma-separated words chosen from TABLE, FILE, and NONE. TABLE selects logging to the general_log and slow_log tables in the mysql system database. FILE selects logging to log files. NONE disables logging. If NONE is present in the value, it takes precedence over any other words that are present. TABLE and FILE can both be given to select both log output destinations.

    This variable selects log output destinations, but does not enable log output. To do that, enable the general_log and slow_query_log system variables. For FILE logging, the general_log_file and slow_query_log_file system variables determine the log file locations. For more information, see Section 5.4.1, “Selecting General Query Log and Slow Query Log Output Destinations”.

  • log_queries_not_using_indexes

    Property Value
    Command-Line Format --log-queries-not-using-indexes[={OFF|ON}]
    System Variable log_queries_not_using_indexes
    Scope Global
    Dynamic Yes
    Type Boolean
    Default Value OFF

    If you enable this variable with the slow query log enabled, queries that are expected to retrieve all rows are logged. See Section 5.4.5, “The Slow Query Log”. This option does not necessarily mean that no index is used. For example, a query that uses a full index scan uses an index but would be logged because the index would not limit the number of rows.

  • log_slow_queries

    Property Value
    Command-Line Format --log_slow_queries[={OFF|ON}]
    Deprecated Yes; use slow_query_log instead
    System Variable log_slow_queries
    Scope Global
    Dynamic Yes
    Type Boolean

    Whether slow queries should be written to the slow query log, which contains entries for all queries that have taken more than long_query_time seconds to execute. See the descriptions of the --log-long-format and --log-short-format options for details. The log output destination can be selected with the log_output system variable. If the log file name is not defined, MySQL uses host_name-slow.log as the file name. See Section 5.4.1, “Selecting General Query Log and Slow Query Log Output Destinations”, and Section 5.4.5, “The Slow Query Log”.

    This variable is deprecated and is removed in MySQL 5.6. Instead, use the slow_query_log system variable to enable the slow query log and the slow_query_log_file system variable to set the slow query log file name.

  • log_warnings

    Property Value
    Command-Line Format --log-warnings[=#]
    System Variable log_warnings
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 1
    Minimum Value 0
    Maximum Value (64-bit platforms, >= 5.5.3) 18446744073709551615
    Maximum Value (64-bit platforms, <= 5.5.2) 18446744073709547520
    Maximum Value (32-bit platforms) 4294967295

    Whether to produce additional warning messages to the error log. This variable is enabled by default with a value of 1. To disable it, set it to 0. If the value is greater than 0, the server logs messages about statements that are unsafe for statement-based logging. If the value is greater than 1, the server logs aborted connections and access-denied errors for new connection attempts. See Section B.4.2.11, “Communication Errors and Aborted Connections”.

  • long_query_time

    Property Value
    Command-Line Format --long-query-time=#
    System Variable long_query_time
    Scope Global, Session
    Dynamic Yes
    Type Numeric
    Default Value 10
    Minimum Value 0

    If a query takes longer than this many seconds, the server increments the Slow_queries status variable. If the slow query log is enabled, the query is logged to the slow query log file. This value is measured in real time, not CPU time, so a query that is under the threshold on a lightly loaded system might be above the threshold on a heavily loaded one. The minimum and default values of long_query_time are 0 and 10, respectively. The value can be specified to a resolution of microseconds. For logging to a file, times are written including the microseconds part. For logging to tables, only integer times are written; the microseconds part is ignored. See Section 5.4.5, “The Slow Query Log”.

  • low_priority_updates

    Property Value
    Command-Line Format --low-priority-updates[={OFF|ON}]
    System Variable low_priority_updates
    Scope Global, Session
    Dynamic Yes
    Type Boolean
    Default Value OFF

    If set to 1, all INSERT, UPDATE, DELETE, and LOCK TABLE WRITE statements wait until there is no pending SELECT or LOCK TABLE READ on the affected table. The same effect can be obtained using {INSERT | REPLACE | DELETE | UPDATE} LOW_PRIORITY ... to lower the priority of only one query. This variable affects only storage engines that use only table-level locking (such as MyISAM, MEMORY, and MERGE). See Section 8.11.2, “Table Locking Issues”. This variable previously was named sql_low_priority_updates.

  • lower_case_file_system

    Property Value
    System Variable lower_case_file_system
    Scope Global
    Dynamic No
    Type Boolean

    This variable describes the case sensitivity of file names on the file system where the data directory is located. OFF means file names are case-sensitive, ON means they are not case-sensitive. This variable is read only because it reflects a file system attribute and setting it would have no effect on the file system.

  • lower_case_table_names

    Property Value
    Command-Line Format --lower-case-table-names[=#]
    System Variable lower_case_table_names
    Scope Global
    Dynamic No
    Type Integer
    Default Value 0
    Minimum Value 0
    Maximum Value 2

    If set to 0, table names are stored as specified and comparisons are case-sensitive. If set to 1, table names are stored in lowercase on disk and comparisons are not case sensitive. If set to 2, table names are stored as given but compared in lowercase. This option also applies to database names and table aliases. For additional information, see Section 9.2.3, “Identifier Case Sensitivity”.

    On Windows the default value is 1. On macOS, the default value is 2. On Linux, a value of 2 is not supported; the server forces the value to 0 instead.

    You should not set lower_case_table_names to 0 if you are running MySQL on a system where the data directory resides on a case-insensitive file system (such as on Windows or macOS). It is an unsupported combination that could result in a hang condition when running an INSERT INTO ... SELECT ... FROM tbl_name operation with the wrong tbl_name letter case. With MyISAM, accessing table names using different letter cases could cause index corruption.

    As of MySQL 5.5.46, an error message is printed and the server exits if you attempt to start the server with --lower_case_table_names=0 on a case-insensitive file system.

    If you are using InnoDB tables, you should set this variable to 1 on all platforms to force names to be converted to lowercase.

    The setting of this variable has no effect on replication filtering options. This is a known issue which is fixed in MySQL 5.6. See Section 17.2.3, “How Servers Evaluate Replication Filtering Rules”, for more information.

    You should not use different settings for lower_case_table_names on replication masters and slaves. In particular, you should not do this when the slave uses a case-sensitive file system, as this can cause replication to fail. This is a known issue which is fixed in MySQL 5.6. For more information, see Section 17.4.1.37, “Replication and Variables”.

  • max_allowed_packet

    Property Value
    Command-Line Format --max-allowed-packet=#
    System Variable max_allowed_packet
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 1048576
    Minimum Value 1024
    Maximum Value 1073741824

    The maximum size of one packet or any generated/intermediate string.

    The packet message buffer is initialized to net_buffer_length bytes, but can grow up to max_allowed_packet bytes when needed. This value by default is small, to catch large (possibly incorrect) packets.

    You must increase this value if you are using large BLOB columns or long strings. It should be as big as the largest BLOB you want to use. The protocol limit for max_allowed_packet is 1GB. The value should be a multiple of 1024; nonmultiples are rounded down to the nearest multiple.

    When you change the message buffer size by changing the value of the max_allowed_packet variable, you should also change the buffer size on the client side if your client program permits it. The default max_allowed_packet value built in to the client library is 1GB, but individual client programs might override this. For example, mysql and mysqldump have defaults of 16MB and 24MB, respectively. They also enable you to change the client-side value by setting max_allowed_packet on the command line or in an option file.

    The session value of this variable is read only. The client can receive up to as many bytes as the session value. However, the server will not send to the client more bytes than the current global max_allowed_packet value. (The global value could be less than the session value if the global value is changed after the client connects.)

  • max_connect_errors

    Property Value
    Command-Line Format --max-connect-errors=#
    System Variable max_connect_errors
    Scope Global
    Dynamic Yes
    Type Integer
    Default Value 10
    Minimum Value 1
    Maximum Value (64-bit platforms, >= 5.5.3) 18446744073709551615
    Maximum Value (64-bit platforms, <= 5.5.2) 18446744073709547520
    Maximum Value (32-bit platforms) 4294967295

    After max_connect_errors successive connection requests from a host are interrupted without a successful connection, the server blocks that host from further connections. If a connection from a host is established successfully within fewer than max_connect_errors attempts after a previous connection was interrupted, the error count for the host is cleared to zero. However, once a host is blocked, flushing the host cache is the only way to unblock it. To flush the host cache, execute a FLUSH HOSTS statement or mysqladmin flush-hosts command.

    For more information about how the host cache works, see Section 8.12.5.2, “DNS Lookup Optimization and the Host Cache”.

  • max_connections

    Property Value
    Command-Line Format --max-connections=#
    System Variable max_connections
    Scope Global
    Dynamic Yes
    Type Integer
    Default Value 151
    Minimum Value 1
    Maximum Value 100000

    The maximum permitted number of simultaneous client connections. For more information, see Section 8.12.5.1, “How MySQL Handles Client Connections”.

  • max_delayed_threads

    Property Value
    Command-Line Format --max-delayed-threads=#
    System Variable max_delayed_threads
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 20
    Minimum Value 0
    Maximum Value 16384

    Do not start more than this number of threads to handle INSERT DELAYED statements. If you try to insert data into a new table after all INSERT DELAYED threads are in use, the row is inserted as if the DELAYED attribute was not specified. If you set this to 0, MySQL never creates a thread to handle DELAYED rows; in effect, this disables DELAYED entirely.

    For the SESSION value of this variable, the only valid values are 0 or the GLOBAL value.

  • max_error_count

    Property Value
    Command-Line Format --max-error-count=#
    System Variable max_error_count
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 64
    Minimum Value 0
    Maximum Value 65535

    The maximum number of error, warning, and information messages to be stored for display by the SHOW ERRORS and SHOW WARNINGS statements.

  • max_heap_table_size

    Property Value
    Command-Line Format --max-heap-table-size=#
    System Variable max_heap_table_size
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 16777216
    Minimum Value 16384
    Maximum Value (64-bit platforms) 1844674407370954752
    Maximum Value (32-bit platforms) 4294967295

    This variable sets the maximum size to which user-created MEMORY tables are permitted to grow. The value of the variable is used to calculate MEMORY table MAX_ROWS values. Setting this variable has no effect on any existing MEMORY table, unless the table is re-created with a statement such as CREATE TABLE or altered with ALTER TABLE or TRUNCATE TABLE. A server restart also sets the maximum size of existing MEMORY tables to the global max_heap_table_size value.

    This variable is also used in conjunction with tmp_table_size to limit the size of internal in-memory tables. See Section 8.4.4, “Internal Temporary Table Use in MySQL”.

    max_heap_table_size is not replicated. See Section 17.4.1.20, “Replication and MEMORY Tables”, and Section 17.4.1.37, “Replication and Variables”, for more information.

  • max_insert_delayed_threads

    Property Value
    System Variable max_insert_delayed_threads
    Scope Global, Session
    Dynamic Yes
    Type Integer

    This variable is a synonym for max_delayed_threads.

  • max_join_size

    Property Value
    Command-Line Format --max-join-size=#
    System Variable max_join_size
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 18446744073709551615
    Minimum Value 1
    Maximum Value 18446744073709551615

    Do not permit statements that probably need to examine more than max_join_size rows (for single-table statements) or row combinations (for multiple-table statements) or that are likely to do more than max_join_size disk seeks. By setting this value, you can catch statements where keys are not used properly and that would probably take a long time. Set it if your users tend to perform joins that lack a WHERE clause, that take a long time, or that return millions of rows. For more information, see Using Safe-Updates Mode (--safe-updates).

    Setting this variable to a value other than DEFAULT resets the value of sql_big_selects to 0. If you set the sql_big_selects value again, the max_join_size variable is ignored.

    If a query result is in the query cache, no result size check is performed, because the result has previously been computed and it does not burden the server to send it to the client.

    This variable previously was named sql_max_join_size.

  • max_length_for_sort_data

    Property Value
    Command-Line Format --max-length-for-sort-data=#
    System Variable max_length_for_sort_data
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 1024
    Minimum Value 4
    Maximum Value 8388608

    The cutoff on the size of index values that determines which filesort algorithm to use. See Section 8.2.1.10, “ORDER BY Optimization”.

  • max_long_data_size

    Property Value
    Command-Line Format --max-long-data-size=#
    Introduced 5.5.11
    Deprecated 5.5.11
    System Variable max_long_data_size
    Scope Global
    Dynamic No
    Type Integer
    Default Value 1048576
    Minimum Value 1024
    Maximum Value 4294967295

    The maximum size of parameter values that can be sent with the mysql_stmt_send_long_data() C API function. If not set at server startup, the default is the value of the max_allowed_packet system variable. This variable is deprecated. In MySQL 5.6, it is removed and the maximum parameter size is controlled by max_allowed_packet.

  • max_prepared_stmt_count

    Property Value
    Command-Line Format --max-prepared-stmt-count=#
    System Variable max_prepared_stmt_count
    Scope Global
    Dynamic Yes
    Type Integer
    Default Value 16382
    Minimum Value 0
    Maximum Value 1048576

    This variable limits the total number of prepared statements in the server. (The sum of the number of prepared statements across all sessions.) It can be used in environments where there is the potential for denial-of-service attacks based on running the server out of memory by preparing huge numbers of statements. If the value is set lower than the current number of prepared statements, existing statements are not affected and can be used, but no new statements can be prepared until the current number drops below the limit. Setting the value to 0 disables prepared statements.

  • max_relay_log_size

    Property Value
    Command-Line Format --max-relay-log-size=#
    System Variable max_relay_log_size
    Scope Global
    Dynamic Yes
    Type Integer
    Default Value 0
    Minimum Value 0
    Maximum Value 1073741824

    If a write by a replication slave to its relay log causes the current log file size to exceed the value of this variable, the slave rotates the relay logs (closes the current file and opens the next one). If max_relay_log_size is 0, the server uses max_binlog_size for both the binary log and the relay log. If max_relay_log_size is greater than 0, it constrains the size of the relay log, which enables you to have different sizes for the two logs. You must set max_relay_log_size to between 4096 bytes and 1GB (inclusive), or to 0. The default value is 0. See Section 17.2.1, “Replication Implementation Details”.

  • max_seeks_for_key

    Property Value
    Command-Line Format --max-seeks-for-key=#
    System Variable max_seeks_for_key
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value (64-bit platforms, >= 5.5.3) 18446744073709551615
    Default Value (64-bit platforms, <= 5.5.2) 18446744073709547520
    Default Value (32-bit platforms) 4294967295
    Minimum Value 1
    Maximum Value (64-bit platforms, >= 5.5.3) 18446744073709551615
    Maximum Value (64-bit platforms, <= 5.5.2) 18446744073709547520
    Maximum Value (32-bit platforms) 4294967295

    Limit the assumed maximum number of seeks when looking up rows based on a key. The MySQL optimizer assumes that no more than this number of key seeks are required when searching for matching rows in a table by scanning an index, regardless of the actual cardinality of the index (see Section 13.7.5.23, “SHOW INDEX Statement”). By setting this to a low value (say, 100), you can force MySQL to prefer indexes instead of table scans.

  • max_sort_length

    Property Value
    Command-Line Format --max-sort-length=#
    System Variable max_sort_length
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 1024
    Minimum Value 4
    Maximum Value 8388608

    The number of bytes to use when sorting data values. The server uses only the first max_sort_length bytes of each value and ignores the rest. Consequently, values that differ only after the first max_sort_length bytes compare as equal for GROUP BY, ORDER BY, and DISTINCT operations.

    Increasing the value of max_sort_length may require increasing the value of sort_buffer_size as well. For details, see Section 8.2.1.10, “ORDER BY Optimization”

  • max_sp_recursion_depth

    Property Value
    Command-Line Format --max-sp-recursion-depth[=#]
    System Variable max_sp_recursion_depth
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 0
    Maximum Value 255

    The number of times that any given stored procedure may be called recursively. The default value for this option is 0, which completely disables recursion in stored procedures. The maximum value is 255.

    Stored procedure recursion increases the demand on thread stack space. If you increase the value of max_sp_recursion_depth, it may be necessary to increase thread stack size by increasing the value of thread_stack at server startup.

  • max_tmp_tables

    This variable is unused.

  • max_user_connections

    Property Value
    Command-Line Format --max-user-connections=#
    System Variable max_user_connections
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 0
    Minimum Value 0
    Maximum Value 4294967295

    The maximum number of simultaneous connections permitted to any given MySQL user account. A value of 0 (the default) means no limit.

    This variable has a global value that can be set at server startup or runtime. It also has a read-only session value that indicates the effective simultaneous-connection limit that applies to the account associated with the current session. The session value is initialized as follows:

    • If the user account has a nonzero MAX_USER_CONNECTIONS resource limit, the session max_user_connections value is set to that limit.

    • Otherwise, the session max_user_connections value is set to the global value.

    Account resource limits are specified using the GRANT statement. See Section 6.2.12, “Setting Account Resource Limits”, and Section 13.7.1.3, “GRANT Statement”.

  • max_write_lock_count

    Property Value
    Command-Line Format --max-write-lock-count=#
    System Variable max_write_lock_count
    Scope Global
    Dynamic Yes
    Type Integer
    Default Value (64-bit platforms, >= 5.5.3) 18446744073709551615
    Default Value (64-bit platforms, <= 5.5.2) 18446744073709547520
    Default Value (32-bit platforms) 4294967295
    Minimum Value 1
    Maximum Value (64-bit platforms, >= 5.5.3) 18446744073709551615
    Maximum Value (64-bit platforms, <= 5.5.2) 18446744073709547520
    Maximum Value (32-bit platforms) 4294967295

    After this many write locks, permit some pending read lock requests to be processed in between. Write lock requests have higher priority than read lock requests. However, if max_write_lock_count is set to some low value (say, 10), read lock requests may be preferred over pending write lock requests if the read lock requests have already been passed over in favor of 10 write lock requests. Normally this behavior does not occur because max_write_lock_count by default has a very large value.

  • metadata_locks_cache_size

    Property Value
    Command-Line Format --metadata-locks-cache-size=#
    Introduced 5.5.19
    System Variable metadata_locks_cache_size
    Scope Global
    Dynamic No
    Type Integer
    Default Value 1024
    Minimum Value 1
    Maximum Value 1048576

    The size of the metadata locks cache. The server uses this cache to avoid creation and destruction of synchronization objects. This is particularly helpful on systems where such operations are expensive, such as Windows XP. This variable was added in MySQL 5.5.19.

  • min_examined_row_limit

    Property Value
    Command-Line Format --min-examined-row-limit=#
    System Variable min_examined_row_limit
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 0
    Minimum Value 0
    Maximum Value (64-bit platforms, >= 5.5.3) 18446744073709551615
    Maximum Value (64-bit platforms, <= 5.5.2) 18446744073709547520
    Maximum Value (32-bit platforms) 4294967295

    Queries that examine fewer than this number of rows are not logged to the slow query log.

  • multi_range_count

    Property Value
    Command-Line Format --multi-range-count=#
    System Variable multi_range_count
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 256
    Minimum Value 1
    Maximum Value 4294967295

    The maximum number of ranges to send to a table handler at once during range selects. The default value is 256. Sending multiple ranges to a handler at once can improve the performance of certain selects dramatically. This is especially true for the NDBCLUSTER table handler, which needs to send the range requests to all nodes. Sending a batch of those requests at once reduces communication costs significantly.

    This variable is deprecated in MySQL 5.1, and is no longer supported in MySQL 5.5, in which arbitrarily long lists of ranges can be processed.

  • myisam_data_pointer_size

    Property Value
    Command-Line Format --myisam-data-pointer-size=#
    System Variable myisam_data_pointer_size
    Scope Global
    Dynamic Yes
    Type Integer
    Default Value 6
    Minimum Value 2
    Maximum Value 7

    The default pointer size in bytes, to be used by CREATE TABLE for MyISAM tables when no MAX_ROWS option is specified. This variable cannot be less than 2 or larger than 7. The default value is 6. See Section B.4.2.12, “The table is full”.

  • myisam_max_sort_file_size

    Property Value
    Command-Line Format --myisam-max-sort-file-size=#
    System Variable myisam_max_sort_file_size
    Scope Global
    Dynamic Yes
    Type Integer
    Default Value (64-bit platforms) 9223372036854775807
    Default Value (32-bit platforms) 2147483648

    The maximum size of the temporary file that MySQL is permitted to use while re-creating a MyISAM index (during REPAIR TABLE, ALTER TABLE, or LOAD DATA). If the file size would be larger than this value, the index is created using the key cache instead, which is slower. The value is given in bytes.

    If MyISAM index files exceed this size and disk space is available, increasing the value may help performance. The space must be available in the file system containing the directory where the original index file is located.

  • myisam_mmap_size

    Property Value
    Command-Line Format --myisam-mmap-size=#
    Introduced 5.5.1
    System Variable myisam_mmap_size
    Scope Global
    Dynamic No
    Type Integer
    Default Value (64-bit platforms, >= 5.5.3) 18446744073709551615
    Default Value (64-bit platforms, <= 5.5.2) 18446744073709547520
    Default Value (32-bit platforms) 4294967295
    Minimum Value 7
    Maximum Value (64-bit platforms, >= 5.5.3) 18446744073709551615
    Maximum Value (64-bit platforms, <= 5.5.2) 18446744073709547520
    Maximum Value (32-bit platforms) 4294967295

    The maximum amount of memory to use for memory mapping compressed MyISAM files. If many compressed MyISAM tables are used, the value can be decreased to reduce the likelihood of memory-swapping problems.

  • myisam_recover_options

    Property Value
    Command-Line Format --myisam-recover-options[=list] (>= 5.5.3)
    System Variable myisam_recover_options
    Scope Global
    Dynamic No
    Type Enumeration
    Default Value OFF
    Valid Values

    OFF

    DEFAULT

    BACKUP

    FORCE

    QUICK

    Set the MyISAM storage engine recovery mode. The variable value is any combination of the values of OFF, DEFAULT, BACKUP, FORCE, or QUICK. If you specify multiple values, separate them by commas. Specifying the variable with no value at server startup is the same as specifying DEFAULT, and specifying with an explicit value of "" disables recovery (same as a value of OFF). If recovery is enabled, each time mysqld opens a MyISAM table, it checks whether the table is marked as crashed or was not closed properly. (The last option works only if you are running with external locking disabled.) If this is the case, mysqld runs a check on the table. If the table was corrupted, mysqld attempts to repair it.

    The following options affect how the repair works.

    Option Description
    OFF No recovery.
    DEFAULT Recovery without backup, forcing, or quick checking.
    BACKUP If the data file was changed during recovery, save a backup of the tbl_name.MYD file as tbl_name-datetime.BAK.
    FORCE Run recovery even if we would lose more than one row from the .MYD file.
    QUICK Do not check the rows in the table if there are not any delete blocks.

    Before the server automatically repairs a table, it writes a note about the repair to the error log. If you want to be able to recover from most problems without user intervention, you should use the options BACKUP,FORCE. This forces a repair of a table even if some rows would be deleted, but it keeps the old data file as a backup so that you can later examine what happened.

    This variable was the --myisam-recover option before MySQL 5.5.3. The old option name still works because it is recognized as an unambiguous prefix of the new name, myisam_recover_options. (Option prefix recognition occurs as described in Section 4.2.2, “Specifying Program Options”.)

    See Section 15.3.1, “MyISAM Startup Options”.

  • myisam_repair_threads

    Property Value
    Command-Line Format --myisam-repair-threads=#
    System Variable myisam_repair_threads
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 1
    Minimum Value 1
    Maximum Value (64-bit platforms, >= 5.5.3) 18446744073709551615
    Maximum Value (64-bit platforms, <= 5.5.2) 18446744073709547520
    Maximum Value (32-bit platforms) 4294967295

    If this value is greater than 1, MyISAM table indexes are created in parallel (each index in its own thread) during the Repair by sorting process. The default value is 1.

    Note

    Multithreaded repair is still beta-quality code.

  • myisam_sort_buffer_size

    Property Value
    Command-Line Format --myisam-sort-buffer-size=#
    System Variable myisam_sort_buffer_size
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 8388608
    Minimum Value 4096
    Maximum Value (Other, 64-bit platforms, >= 5.5.3) 18446744073709551615
    Maximum Value (Other, 64-bit platforms, <= 5.5.2) 18446744073709547520
    Maximum Value (Other, 32-bit platforms) 4294967295
    Maximum Value (Windows, 64-bit platforms, >= 5.5.22) 18446744073709551615
    Maximum Value (Windows, 64-bit platforms, <= 5.5.21) 4294967295
    Maximum Value (Windows, 32-bit platforms) 4294967295

    The size of the buffer that is allocated when sorting MyISAM indexes during a REPAIR TABLE or when creating indexes with CREATE INDEX or ALTER TABLE.

    The maximum permissible setting for myisam_sort_buffer_size is 4GB−1. Larger values are permitted for 64-bit platforms (except 64-bit Windows prior to MySQL 5.5.22, for which large values are truncated to 4GB−1 with a warning).

  • myisam_stats_method

    Property Value
    Command-Line Format --myisam-stats-method=name
    System Variable myisam_stats_method
    Scope Global, Session
    Dynamic Yes
    Type Enumeration
    Default Value nulls_unequal
    Valid Values

    nulls_equal

    nulls_unequal

    nulls_ignored

    How the server treats NULL values when collecting statistics about the distribution of index values for MyISAM tables. This variable has three possible values, nulls_equal, nulls_unequal, and nulls_ignored. For nulls_equal, all NULL index values are considered equal and form a single value group that has a size equal to the number of NULL values. For nulls_unequal, NULL values are considered unequal, and each NULL forms a distinct value group of size 1. For nulls_ignored, NULL values are ignored.

    The method that is used for generating table statistics influences how the optimizer chooses indexes for query execution, as described in Section 8.3.7, “InnoDB and MyISAM Index Statistics Collection”.

  • myisam_use_mmap

    Property Value
    Command-Line Format --myisam-use-mmap[={OFF|ON}]
    System Variable myisam_use_mmap
    Scope Global
    Dynamic Yes
    Type Boolean
    Default Value OFF

    Use memory mapping for reading and writing MyISAM tables.

  • named_pipe

    Property Value
    Command-Line Format --named-pipe[={OFF|ON}]
    System Variable named_pipe
    Scope Global
    Dynamic No
    Platform Specific Windows
    Type Boolean
    Default Value OFF

    (Windows only.) Indicates whether the server supports connections over named pipes.

  • net_buffer_length

    Property Value
    Command-Line Format --net-buffer-length=#
    System Variable net_buffer_length
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 16384
    Minimum Value 1024
    Maximum Value 1048576

    Each client thread is associated with a connection buffer and result buffer. Both begin with a size given by net_buffer_length but are dynamically enlarged up to max_allowed_packet bytes as needed. The result buffer shrinks to net_buffer_length after each SQL statement.

    This variable should not normally be changed, but if you have very little memory, you can set it to the expected length of statements sent by clients. If statements exceed this length, the connection buffer is automatically enlarged. The maximum value to which net_buffer_length can be set is 1MB.

    The session value of this variable is read only.

  • net_read_timeout

    Property Value
    Command-Line Format --net-read-timeout=#
    System Variable net_read_timeout
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 30
    Minimum Value 1

    The number of seconds to wait for more data from a connection before aborting the read. When the server is reading from the client, net_read_timeout is the timeout value controlling when to abort. When the server is writing to the client, net_write_timeout is the timeout value controlling when to abort. See also slave_net_timeout.

  • net_retry_count

    Property Value
    Command-Line Format --net-retry-count=#
    System Variable net_retry_count
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 10
    Minimum Value 1
    Maximum Value (64-bit platforms, >= 5.5.3) 18446744073709551615
    Maximum Value (64-bit platforms, <= 5.5.2) 18446744073709547520
    Maximum Value (32-bit platforms) 4294967295

    If a read or write on a communication port is interrupted, retry this many times before giving up. This value should be set quite high on FreeBSD because internal interrupts are sent to all threads.

  • net_write_timeout

    Property Value
    Command-Line Format --net-write-timeout=#
    System Variable net_write_timeout
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 60
    Minimum Value 1

    The number of seconds to wait for a block to be written to a connection before aborting the write. See also net_read_timeout.

  • new

    Property Value
    Command-Line Format --new[={OFF|ON}]
    System Variable new
    Scope Global, Session
    Dynamic Yes
    Disabled by skip-new
    Type Boolean
    Default Value OFF

    This variable was used in MySQL 4.0 to turn on some 4.1 behaviors, and is retained for backward compatibility. Its value is always OFF.

    In NDB Cluster, setting this variable to ON makes it possible to employ partitioning types other than KEY or LINEAR KEY with NDB tables. This feature is experimental only, and not supported in production. For additional information, see User-defined partitioning and the NDB storage engine (NDB Cluster).

  • old

    Property Value
    Command-Line Format --old[={OFF|ON}]
    System Variable old
    Scope Global
    Dynamic No
    Type Boolean
    Default Value OFF

    old is a compatibility variable. It is disabled by default, but can be enabled at startup to revert the server to behaviors present in older versions.

    When old is enabled, it changes the default scope of index hints to that used prior to MySQL 5.1.17. That is, index hints with no FOR clause apply only to how indexes are used for row retrieval and not to resolution of ORDER BY or GROUP BY clauses. (See Section 8.9.3, “Index Hints”.) Take care about enabling this in a replication setup. With statement-based binary logging, having different modes for the master and slaves might lead to replication errors.

  • old_alter_table

    Property Value
    Command-Line Format --old-alter-table[={OFF|ON}]
    System Variable old_alter_table
    Scope Global, Session
    Dynamic Yes
    Type Boolean
    Default Value OFF

    When this variable is enabled, the server does not use the optimized method of processing an ALTER TABLE operation. It reverts to using a temporary table, copying over the data, and then renaming the temporary table to the original, as used by MySQL 5.0 and earlier. For more information on the operation of ALTER TABLE, see Section 13.1.7, “ALTER TABLE Statement”.

  • old_passwords

    Property Value
    Command-Line Format --old-passwords=value
    System Variable old_passwords
    Scope Global, Session
    Dynamic Yes
    Type Boolean
    Default Value 0

    This variable controls the password hashing method used by the PASSWORD() function. It also influences password hashing performed by CREATE USER and GRANT statements that specify a password using an IDENTIFIED BY clause.

    The following table shows, for each password hashing method, the permitted value of old_passwords and which authentication plugins use the hashing method.

    Password Hashing Method old_passwords Value Associated Authentication Plugin
    MySQL 4.1 native hashing 0 or OFF mysql_native_password
    Pre-4.1 (old) hashing 1 or ON mysql_old_password

    If old_passwords=1, PASSWORD(str) returns the same value as OLD_PASSWORD(str). The latter function is not affected by the value of old_passwords.

    For additional information about authentication plugins and hashing formats, see Section 6.2.10, “Pluggable Authentication”, and Section 6.1.2.4, “Password Hashing in MySQL”.

    Note

    Passwords that use the pre-4.1 hashing method are less secure than passwords that use the native password hashing method and should be avoided.

  • one_shot

    This is not a variable, but it can be used when setting some variables. It is described in Section 13.7.4.1, “SET Syntax for Variable Assignment”.

  • open_files_limit

    Property Value
    Command-Line Format --open-files-limit=#
    System Variable open_files_limit
    Scope Global
    Dynamic No
    Type Integer
    Default Value 0
    Minimum Value 0
    Maximum Value platform dependent

    The number of file descriptors available to mysqld from the operating system. mysqld reserves descriptors with setrlimit(), using the value requested at startup by setting this variable or the --open-files-limit option to mysqld_safe. You should try increasing the value of this variable if mysqld gives you the error Too many open files. Internally, the maximum value for this variable is the maximum unsigned integer value, but the actual maximum is platform dependent.

    The runtime variable value indicates the number of file descriptors actually permitted by the system and might differ from the value requested at startup. If the requested number of file descriptors cannot be allocated, mysqld writes a warning to the error log.

    mysqld may attempt to allocate more than the requested number of descriptors (if they are available), using the values of max_connections and table_open_cache to estimate whether more descriptors will be needed.

    The value is 0 on systems where MySQL cannot change the number of open files.

    On Unix, the value cannot be set greater than ulimit -n.

  • optimizer_prune_level

    Property Value
    Command-Line Format --optimizer-prune-level=#
    System Variable optimizer_prune_level
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 1
    Minimum Value 0
    Maximum Value 1

    Controls the heuristics applied during query optimization to prune less-promising partial plans from the optimizer search space. A value of 0 disables heuristics so that the optimizer performs an exhaustive search. A value of 1 causes the optimizer to prune plans based on the number of rows retrieved by intermediate plans.

  • optimizer_search_depth

    Property Value
    Command-Line Format --optimizer-search-depth=#
    System Variable optimizer_search_depth
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 62
    Minimum Value 0
    Maximum Value 63

    The maximum depth of search performed by the query optimizer. Values larger than the number of relations in a query result in better query plans, but take longer to generate an execution plan for a query. Values smaller than the number of relations in a query return an execution plan quicker, but the resulting plan may be far from being optimal. If set to 0, the system automatically picks a reasonable value. If set to 63, the optimizer switches to the algorithm used in MySQL 5.0.0 (and previous versions) for performing searches. The value of 63 is deprecated and will be treated as invalid in a future MySQL release.

  • optimizer_switch

    Property Value
    Command-Line Format --optimizer-switch=value
    System Variable optimizer_switch
    Scope Global, Session
    Dynamic Yes
    Type Set
    Valid Values (>= 5.5.3)

    engine_condition_pushdown={on|off}

    index_merge={on|off}

    index_merge_intersection={on|off}

    index_merge_sort_union={on|off}

    index_merge_union={on|off}

    Valid Values (<= 5.5.2)

    index_merge={on|off}

    index_merge_intersection={on|off}

    index_merge_sort_union={on|off}

    index_merge_union={on|off}

    The optimizer_switch system variable enables control over optimizer behavior. The value of this variable is a set of flags, each of which has a value of on or off to indicate whether the corresponding optimizer behavior is enabled or disabled. This variable has global and session values and can be changed at runtime. The global default can be set at server startup.

    To see the current set of optimizer flags, select the variable value:

    mysql> SELECT @@optimizer_switch\G
    *************************** 1. row ***************************
    @@optimizer_switch: index_merge=on,index_merge_union=on,
                        index_merge_sort_union=on,
                        index_merge_intersection=on,
                        engine_condition_pushdown=on
    

    For more information about the syntax of this variable and the optimizer behaviors that it controls, see Section 8.9.2, “Switchable Optimizations”.

  • performance_schema_xxx

    Performance Schema system variables are listed in Section 22.12, “Performance Schema System Variables”. These variables may be used to configure Performance Schema operation.

  • pid_file

    Property Value
    Command-Line Format --pid-file=file_name
    System Variable pid_file
    Scope Global
    Dynamic No
    Type File name

    The path name of the file in which the server writes its process ID. The server creates the file in the data directory unless an absolute path name is given to specify a different directory. This file is used by other programs such as mysqld_safe to determine the server's process ID. On Windows, this variable also affects the default error log file name. See Section 5.4.2, “The Error Log”

  • plugin_dir

    Property Value
    Command-Line Format --plugin-dir=dir_name
    System Variable plugin_dir
    Scope Global
    Dynamic No
    Type Directory name
    Default Value (Other, <= 5.5.4) BASEDIR/lib/mysql/plugin
    Default Value (Windows, <= 5.5.4) BASEDIR/lib/plugin
    Default Value (>= 5.5.5) BASEDIR/lib/plugin

    The path name of the plugin directory.

    If the plugin directory is writable by the server, it may be possible for a user to write executable code to a file in the directory using SELECT ... INTO DUMPFILE. This can be prevented by making plugin_dir read only to the server or by setting secure_file_priv to a directory where SELECT writes can be made safely.

  • port

    Property Value
    Command-Line Format --port=port_num
    System Variable port
    Scope Global
    Dynamic No
    Type Integer
    Default Value 3306
    Minimum Value 0
    Maximum Value 65535

    The number of the port on which the server listens for TCP/IP connections. This variable can be set with the --port option.

  • preload_buffer_size

    Property Value
    Command-Line Format --preload-buffer-size=#
    System Variable preload_buffer_size
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 32768
    Minimum Value 1024
    Maximum Value 1073741824

    The size of the buffer that is allocated when preloading indexes.

  • profiling

    If set to 0 or OFF (the default), statement profiling is disabled. If set to 1 or ON, statement profiling is enabled and the SHOW PROFILE and SHOW PROFILES statements provide access to profiling information. See Section 13.7.5.32, “SHOW PROFILES Statement”.

  • profiling_history_size

    The number of statements for which to maintain profiling information if profiling is enabled. The default value is 15. The maximum value is 100. Setting the value to 0 effectively disables profiling. See Section 13.7.5.32, “SHOW PROFILES Statement”.

  • protocol_version

    Property Value
    System Variable protocol_version
    Scope Global
    Dynamic No
    Type Integer

    The version of the client/server protocol used by the MySQL server.

  • proxy_user

    Property Value
    Introduced 5.5.7
    System Variable proxy_user
    Scope Session
    Dynamic No
    Type String

    If the current client is a proxy for another user, this variable is the proxy user account name. Otherwise, this variable is NULL. See Section 6.2.11, “Proxy Users”.

  • pseudo_slave_mode

    Property Value
    Introduced 5.5.30
    System Variable pseudo_slave_mode
    Scope Session
    Dynamic Yes
    Type Integer

    This variable is for internal server use. It was added in MySQL 5.5.30.

  • pseudo_thread_id

    Property Value
    System Variable pseudo_thread_id
    Scope Session
    Dynamic Yes
    Type Integer

    This variable is for internal server use.

  • query_alloc_block_size

    Property Value
    Command-Line Format --query-alloc-block-size=#
    System Variable query_alloc_block_size
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 8192
    Minimum Value 1024
    Maximum Value (64-bit platforms, >= 5.5.3) 18446744073709551615
    Maximum Value (64-bit platforms, <= 5.5.2) 18446744073709547520
    Maximum Value (32-bit platforms) 4294967295
    Block Size 1024

    The allocation size of memory blocks that are allocated for objects created during statement parsing and execution. If you have problems with memory fragmentation, it might help to increase this parameter.

  • query_cache_limit

    Property Value
    Command-Line Format --query-cache-limit=#
    System Variable query_cache_limit
    Scope Global
    Dynamic Yes
    Type Integer
    Default Value 1048576
    Minimum Value 0
    Maximum Value (64-bit platforms, >= 5.5.3) 18446744073709551615
    Maximum Value (64-bit platforms, <= 5.5.2) 18446744073709547520
    Maximum Value (32-bit platforms) 4294967295

    Do not cache results that are larger than this number of bytes. The default value is 1MB.

  • query_cache_min_res_unit

    Property Value
    Command-Line Format --query-cache-min-res-unit=#
    System Variable query_cache_min_res_unit
    Scope Global
    Dynamic Yes
    Type Integer
    Default Value 4096
    Minimum Value 512
    Maximum Value (64-bit platforms, >= 5.5.3) 18446744073709551615
    Maximum Value (64-bit platforms, <= 5.5.2) 18446744073709547520
    Maximum Value (32-bit platforms) 4294967295

    The minimum size (in bytes) for blocks allocated by the query cache. The default value is 4096 (4KB). Tuning information for this variable is given in Section 8.10.3.3, “Query Cache Configuration”.

  • query_cache_size

    Property Value
    Command-Line Format --query-cache-size=#
    System Variable query_cache_size
    Scope Global
    Dynamic Yes
    Type Integer
    Default Value 0
    Minimum Value 0
    Maximum Value (64-bit platforms, >= 5.5.3) 18446744073709551615
    Maximum Value (64-bit platforms, <= 5.5.2) 18446744073709547520
    Maximum Value (32-bit platforms) 4294967295

    The amount of memory allocated for caching query results. The default value is 0, which disables the query cache. To reduce overhead significantly, you should also start the server with query_cache_type=0 if you will not be using the query cache.

    The permissible values are multiples of 1024; other values are rounded down to the nearest multiple. For nonzero values of query_cache_size, that many bytes of memory are allocated even if query_cache_type=0. See Section 8.10.3.3, “Query Cache Configuration”, for more information.

    The query cache needs a minimum size of about 40KB to allocate its structures. (The exact size depends on system architecture.) If you set the value of query_cache_size too small, a warning will occur, as described in Section 8.10.3.3, “Query Cache Configuration”.

  • query_cache_type

    Property Value
    Command-Line Format --query-cache-type=#
    System Variable query_cache_type
    Scope Global, Session
    Dynamic Yes
    Type Enumeration
    Default Value 1
    Valid Values

    0

    1

    2

    Set the query cache type. Setting the GLOBAL value sets the type for all clients that connect thereafter. Individual clients can set the SESSION value to affect their own use of the query cache. Possible values are shown in the following table.

    Option Description
    0 or OFF Do not cache results in or retrieve results from the query cache. Note that this does not deallocate the query cache buffer. To do that, you should set query_cache_size to 0.
    1 or ON Cache all cacheable query results except for those that begin with SELECT SQL_NO_CACHE.
    2 or DEMAND Cache results only for cacheable queries that begin with SELECT SQL_CACHE.

    This variable defaults to ON.

    If the server is started with query_cache_type set to 0, it does not acquire the query cache mutex at all, which means that the query cache cannot be enabled at runtime and there is reduced overhead in query execution.

  • query_cache_wlock_invalidate

    Property Value
    Command-Line Format --query-cache-wlock-invalidate[={OFF|ON}]
    System Variable query_cache_wlock_invalidate
    Scope Global, Session
    Dynamic Yes
    Type Boolean
    Default Value OFF

    Normally, when one client acquires a WRITE lock on a MyISAM table, other clients are not blocked from issuing statements that read from the table if the query results are present in the query cache. Setting this variable to 1 causes acquisition of a WRITE lock for a table to invalidate any queries in the query cache that refer to the table. This forces other clients that attempt to access the table to wait while the lock is in effect.

  • query_prealloc_size

    Property Value
    Command-Line Format --query-prealloc-size=#
    System Variable query_prealloc_size
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 8192
    Minimum Value 8192
    Maximum Value (64-bit platforms, >= 5.5.3) 18446744073709551615
    Maximum Value (64-bit platforms, <= 5.5.2) 18446744073709547520
    Maximum Value (32-bit platforms) 4294967295
    Block Size 1024

    The size of the persistent buffer used for statement parsing and execution. This buffer is not freed between statements. If you are running complex queries, a larger query_prealloc_size value might be helpful in improving performance, because it can reduce the need for the server to perform memory allocation during query execution operations.

  • rand_seed1

    Property Value
    System Variable rand_seed1
    Scope Session
    Dynamic Yes
    Type Integer

    The rand_seed1 and rand_seed2 variables exist as session variables only, and can be set but not read. The variables—but not their values—are shown in the output of SHOW VARIABLES.

    The purpose of these variables is to support replication of the RAND() function. For statements that invoke RAND(), the master passes two values to the slave, where they are used to seed the random number generator. The slave uses these values to set the session variables rand_seed1 and rand_seed2 so that RAND() on the slave generates the same value as on the master.

  • rand_seed2

    See the description for rand_seed1.

  • range_alloc_block_size

    Property Value
    Command-Line Format --range-alloc-block-size=#
    System Variable range_alloc_block_size
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 4096
    Minimum Value 4096
    Maximum Value (64-bit platforms, >= 5.5.3) 18446744073709551615
    Maximum Value (32-bit platforms) 4294967295
    Block Size 1024

    The size of blocks that are allocated when doing range optimization.

  • read_buffer_size

    Property Value
    Command-Line Format --read-buffer-size=#
    System Variable read_buffer_size
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 131072
    Minimum Value 8200
    Maximum Value 2147479552

    Each thread that does a sequential scan for a MyISAM table allocates a buffer of this size (in bytes) for each table it scans. If you do many sequential scans, you might want to increase this value, which defaults to 131072. The value of this variable should be a multiple of 4KB. If it is set to a value that is not a multiple of 4KB, its value will be rounded down to the nearest multiple of 4KB.

    This option is also used in the following context for all storage engines:

    • For caching the indexes in a temporary file (not a temporary table), when sorting rows for ORDER BY.

    • For bulk insert into partitions.

    • For caching results of nested queries.

    read_buffer_size is also used in one other storage engine-specific way: to determine the memory block size for MEMORY tables.

    For more information about memory use during different operations, see Section 8.12.4.1, “How MySQL Uses Memory”.

  • read_only

    Property Value
    Command-Line Format --read-only[={OFF|ON}]
    System Variable read_only
    Scope Global
    Dynamic Yes
    Type Boolean
    Default Value OFF

    When the read_only system variable is enabled, the server permits no client updates except from users who have the SUPER privilege. This variable is disabled by default.

    Even with read_only enabled, the server permits these operations:

    read_only exists only as a GLOBAL variable, so changes to its value require the SUPER privilege. Changes to read_only on a master server are not replicated to slave servers. The value can be set on a slave server independent of the setting on the master.

    The following conditions apply to attempts to enable read_only:

    • The attempt fails and an error occurs if you have any explicit locks (acquired with LOCK TABLES) or have a pending transaction.

    • The attempt blocks while other clients have any ongoing statement, active LOCK TABLES WRITE, or ongoing commit, until the locks are released and the statements and transactions end. While the attempt to enable read_only is pending, requests by other clients for table locks or to begin transactions also block until read_only has been set.

    • The attempt blocks if there are active transactions that hold metadata locks, until those transactions end.

    • read_only can be enabled while you hold a global read lock (acquired with FLUSH TABLES WITH READ LOCK) because that does not involve table locks.

  • read_rnd_buffer_size

    Property Value
    Command-Line Format --read-rnd-buffer-size=#
    System Variable read_rnd_buffer_size
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 262144
    Minimum Value (>= 5.5.3) 1
    Minimum Value (<= 5.5.2) 8200
    Maximum Value 2147483647

    When reading rows from a MyISAM table in sorted order following a key-sorting operation, the rows are read through this buffer to avoid disk seeks. See Section 8.2.1.10, “ORDER BY Optimization”. Setting the variable to a large value can improve ORDER BY performance by a lot. However, this is a buffer allocated for each client, so you should not set the global variable to a large value. Instead, change the session variable only from within those clients that need to run large queries.

    For more information about memory use during different operations, see Section 8.12.4.1, “How MySQL Uses Memory”.

  • relay_log_purge

    Property Value
    Command-Line Format --relay-log-purge[={OFF|ON}]
    System Variable relay_log_purge
    Scope Global
    Dynamic Yes
    Type Boolean
    Default Value ON

    Disables or enables automatic purging of relay log files as soon as they are not needed any more. The default value is 1 (ON).

  • relay_log_space_limit

    Property Value
    Command-Line Format --relay-log-space-limit=#
    System Variable relay_log_space_limit
    Scope Global
    Dynamic No
    Type Integer
    Default Value 0
    Minimum Value 0
    Maximum Value (64-bit platforms, >= 5.5.3) 18446744073709551615
    Maximum Value (64-bit platforms, <= 5.5.2) 18446744073709547520
    Maximum Value (32-bit platforms) 4294967295

    The maximum amount of space to use for all relay logs.

  • rpl_semi_sync_master_enabled

    Property Value
    Command-Line Format --rpl-semi-sync-master-enabled[={OFF|ON}]
    System Variable rpl_semi_sync_master_enabled
    Scope Global
    Dynamic Yes
    Type Boolean
    Default Value OFF

    Controls whether semisynchronous replication is enabled on the master. To enable or disable the plugin, set this variable to ON or OFF (or 1 or 0), respectively. The default is OFF.

    This variable is available only if the master-side semisynchronous replication plugin is installed.

  • rpl_semi_sync_master_timeout

    Property Value
    Command-Line Format --rpl-semi-sync-master-timeout=#
    System Variable rpl_semi_sync_master_timeout
    Scope Global
    Dynamic Yes
    Type Integer
    Default Value 10000

    A value in milliseconds that controls how long the master waits on a commit for acknowledgment from a slave before timing out and reverting to asynchronous replication. The default value is 10000 (10 seconds).

    This variable is available only if the master-side semisynchronous replication plugin is installed.

  • rpl_semi_sync_master_trace_level

    Property Value
    Command-Line Format --rpl-semi-sync-master-trace-level=#
    System Variable rpl_semi_sync_master_trace_level
    Scope Global
    Dynamic Yes
    Type Integer
    Default Value 32

    The semisynchronous replication debug trace level on the master. Four levels are defined:

    • 1 = general level (for example, time function failures)

    • 16 = detail level (more verbose information)

    • 32 = net wait level (more information about network waits)

    • 64 = function level (information about function entry and exit)

    This variable is available only if the master-side semisynchronous replication plugin is installed.

  • rpl_semi_sync_master_wait_no_slave

    Property Value
    Command-Line Format --rpl-semi-sync-master-wait-no-slave[={OFF|ON}]
    System Variable rpl_semi_sync_master_wait_no_slave
    Scope Global
    Dynamic Yes
    Type Boolean
    Default Value ON

    With semisynchronous replication, for each transaction, the master waits until timeout for acknowledgment of receipt from some semisynchronous slave. If no response occurs during this period, the master reverts to normal replication. This variable controls whether the master waits for the timeout to expire before reverting to normal replication even if the slave count drops to zero during the timeout period.

    If the value is ON (the default), it is permissible for the slave count to drop to zero during the timeout period (for example, if slaves disconnect). The master still waits for the timeout, so as long as some slave reconnects and acknowledges the transaction within the timeout interval, semisynchronous replication continues.

    If the value is OFF, the master reverts to normal replication if the slave count drops to zero during the timeout period.

    This variable is available only if the master-side semisynchronous replication plugin is installed.

  • rpl_semi_sync_slave_enabled

    Property Value
    Command-Line Format --rpl-semi-sync-slave-enabled[={OFF|ON}]
    System Variable rpl_semi_sync_slave_enabled
    Scope Global
    Dynamic Yes
    Type Boolean
    Default Value OFF

    Controls whether semisynchronous replication is enabled on the slave. To enable or disable the plugin, set this variable to ON or OFF (or 1 or 0), respectively. The default is OFF.

    This variable is available only if the slave-side semisynchronous replication plugin is installed.

  • rpl_semi_sync_slave_trace_level

    Property Value
    Command-Line Format --rpl-semi-sync-slave-trace-level=#
    System Variable rpl_semi_sync_slave_trace_level
    Scope Global
    Dynamic Yes
    Type Integer
    Default Value 32

    The semisynchronous replication debug trace level on the slave. See rpl_semi_sync_master_trace_level for the permissible values.

    This variable is available only if the slave-side semisynchronous replication plugin is installed.

  • secure_auth

    Property Value
    Command-Line Format --secure-auth[={OFF|ON}]
    System Variable secure_auth
    Scope Global
    Dynamic Yes
    Type Boolean
    Default Value OFF

    If this variable is enabled, the server blocks connections by clients that attempt to use accounts that have passwords stored in the old (pre-4.1) format. Enable this variable to prevent all use of passwords employing the old format (and hence insecure communication over the network).

    Server startup fails with an error if this variable is enabled and the privilege tables are in pre-4.1 format. See Section B.4.2.4, “Client does not support authentication protocol”.

    Note

    Passwords that use the pre-4.1 hashing method are less secure than passwords that use the native password hashing method and should be avoided.

  • secure_file_priv

    Property Value
    Command-Line Format --secure-file-priv=dir_name
    System Variable secure_file_priv
    Scope Global
    Dynamic No
    Type String
    Default Value (>= 5.5.53) platform specific
    Default Value (<= 5.5.52) empty string
    Valid Values (>= 5.5.53)

    empty string

    dirname

    NULL

    Valid Values (<= 5.5.52)

    empty string

    dirname

    This variable is used to limit the effect of data import and export operations, such as those performed by the LOAD DATA and SELECT ... INTO OUTFILE statements and the LOAD_FILE() function. These operations are permitted only to users who have the FILE privilege.

    secure_file_priv may be set as follows:

    • If empty, the variable has no effect. This is not a secure setting.

    • If set to the name of a directory, the server limits import and export operations to work only with files in that directory. The directory must exist; the server will not create it.

    • If set to NULL, the server disables import and export operations. This value is permitted as of MySQL 5.5.53.

    Before MySQL 5.5.53, this variable is empty by default. As of 5.5.53, the default value is platform specific and depends on the value of the INSTALL_LAYOUT CMake option, as shown in the following table. To specify the default secure_file_priv value explicitly if you are building from source, use the INSTALL_SECURE_FILE_PRIVDIR CMake option.

    INSTALL_LAYOUT Value Default secure_file_priv Value
    STANDALONE, WIN NULL
    DEB, RPM, SLES, SVR4 /var/lib/mysql-files
    Otherwise mysql-files under the CMAKE_INSTALL_PREFIX value

    To set the default secure_file_priv value for the libmysqld embedded server, use the INSTALL_SECURE_FILE_PRIV_EMBEDDEDDIR CMake option. The default value for this option is NULL.

    As of MySQL 5.5.53, the server checks the value of secure_file_priv at startup and writes a warning to the error log if the value is insecure. A non-NULL value is considered insecure if it is empty, or the value is the data directory or a subdirectory of it, or a directory that is accessible by all users. If secure_file_priv is set to a nonexistent path, the server writes an error message to the error log and exits.

  • shared_memory

    Property Value
    Command-Line Format --shared-memory[={OFF|ON}]
    System Variable shared_memory
    Scope Global
    Dynamic No
    Platform Specific Windows
    Type Boolean
    Default Value OFF

    (Windows only.) Whether the server permits shared-memory connections.

  • shared_memory_base_name

    Property Value
    Command-Line Format --shared-memory-base-name=name
    System Variable shared_memory_base_name
    Scope Global
    Dynamic No
    Platform Specific Windows
    Type String
    Default Value MYSQL

    (Windows only.) The name of shared memory to use for shared-memory connections. This is useful when running multiple MySQL instances on a single physical machine. The default name is MYSQL. The name is case-sensitive.

    This variable applies only if the server is started with the shared_memory system variable enabled to support shared-memory connections.

  • skip_external_locking

    Property Value
    Command-Line Format --skip-external-locking[={OFF|ON}]
    System Variable skip_external_locking
    Scope Global
    Dynamic No
    Type Boolean
    Default Value ON

    This is OFF if mysqld uses external locking (system locking), ON if external locking is disabled. This affects only MyISAM table access.

    This variable is set by the --external-locking or --skip-external-locking option. External locking is disabled by default.

    External locking affects only MyISAM table access. For more information, including conditions under which it can and cannot be used, see Section 8.11.5, “External Locking”.

  • skip_name_resolve

    Property Value
    Command-Line Format --skip-name-resolve[={OFF|ON}]
    System Variable skip_name_resolve
    Scope Global
    Dynamic No
    Type Boolean
    Default Value OFF

    Whether to resolve host names when checking client connections. If this variable is OFF, mysqld resolves host names when checking client connections. If it is ON, mysqld uses only IP numbers; in this case, all Host column values in the grant tables must be IP addresses or localhost. See Section 8.12.5.2, “DNS Lookup Optimization and the Host Cache”.

    Depending on the network configuration of your system and the Host values for your accounts, clients may need to connect using an explicit --host option, such as --host=localhost, --host=127.0.0.1, or --host=::1.

    An attempt to connect to the host 127.0.0.1 normally resolves to the localhost account. However, this fails if the server is run with skip_name_resolve enabled. If you plan to do that, make sure an account exists that can accept a connection. For example, to be able to connect as root using --host=127.0.0.1 or --host=::1, create these accounts:

    CREATE USER 'root'@'127.0.0.1' IDENTIFIED BY 'root-password';
    CREATE USER 'root'@'::1' IDENTIFIED BY 'root-password';
    
  • skip_networking

    Property Value
    Command-Line Format --skip-networking[={OFF|ON}]
    System Variable skip_networking
    Scope Global
    Dynamic No
    Type Boolean
    Default Value OFF

    This variable controls whether the server permits TCP/IP connections. By default, it is disabled (permit TCP connections). If enabled, the server permits only local (non-TCP/IP) connections and all interaction with mysqld must be made using named pipes or shared memory (on Windows) or Unix socket files (on Unix). This option is highly recommended for systems where only local clients are permitted. See Section 8.12.5.2, “DNS Lookup Optimization and the Host Cache”.

  • skip_show_database

    Property Value
    Command-Line Format --skip-show-database
    System Variable skip_show_database
    Scope Global
    Dynamic No

    This prevents people from using the SHOW DATABASES statement if they do not have the SHOW DATABASES privilege. This can improve security if you have concerns about users being able to see databases belonging to other users. Its effect depends on the SHOW DATABASES privilege: If the variable value is ON, the SHOW DATABASES statement is permitted only to users who have the SHOW DATABASES privilege, and the statement displays all database names. If the value is OFF, SHOW DATABASES is permitted to all users, but displays the names of only those databases for which the user has the SHOW DATABASES or other privilege.

    Caution

    Because a global privilege is considered a privilege for all databases, any global privilege enables a user to see all database names with SHOW DATABASES or by examining the INFORMATION_SCHEMA SCHEMATA table.

  • slow_launch_time

    Property Value
    Command-Line Format --slow-launch-time=#
    System Variable slow_launch_time
    Scope Global
    Dynamic Yes
    Type Integer
    Default Value 2

    If creating a thread takes longer than this many seconds, the server increments the Slow_launch_threads status variable.

  • slow_query_log

    Property Value
    Command-Line Format --slow-query-log[={OFF|ON}]
    System Variable slow_query_log
    Scope Global
    Dynamic Yes
    Type Boolean
    Default Value OFF

    Whether the slow query log is enabled. The value can be 0 (or OFF) to disable the log or 1 (or ON) to enable the log. The destination for log output is controlled by the log_output system variable; if that value is NONE, no log entries are written even if the log is enabled.

    Slow is determined by the value of the long_query_time variable. See Section 5.4.5, “The Slow Query Log”.

  • slow_query_log_file

    Property Value
    Command-Line Format --slow-query-log-file=file_name
    System Variable slow_query_log_file
    Scope Global
    Dynamic Yes
    Type File name
    Default Value host_name-slow.log

    The name of the slow query log file. The default value is host_name-slow.log, but the initial value can be changed with the --slow_query_log_file option.

  • socket

    Property Value
    Command-Line Format --socket={file_name|pipe_name}
    System Variable socket
    Scope Global
    Dynamic No
    Type String
    Default Value (Other) /tmp/mysql.sock
    Default Value (Windows) MySQL

    On Unix platforms, this variable is the name of the socket file that is used for local client connections. The default is /tmp/mysql.sock. (For some distribution formats, the directory might be different, such as /var/lib/mysql for RPMs.)

    On Windows, this variable is the name of the named pipe that is used for local client connections. The default value is MySQL (not case-sensitive).

  • sort_buffer_size

    Property Value
    Command-Line Format --sort-buffer-size=#
    System Variable sort_buffer_size
    Scope Global, Session
    Dynamic Yes
    Type Integer
    Default Value 2097144
    Minimum Value 32768
    Maximum Value (Other, 64-bit platforms) 18446744073709551615
    Maximum Value (Other, 32-bit platforms) 4294967295
    Maximum Value (Windows) 4294967295

    Each session that must perform a sort allocates a buffer of this size. sort_buffer_size is not specific to any storage engine and applies in a general manner for optimization. At minimum the sort_buffer_size value must be large enough to accommodate fifteen tuples in the sort buffer. Also, increasing the value of max_sort_length may require increasing the value of sort_buffer_size. For more information, see Section 8.2.1.10, “ORDER BY Optimization”

    If you see many Sort_merge_passes per second in SHOW GLOBAL STATUS output, you can consider increasing the sort_buffer_size value to speed up ORDER BY or GROUP BY operations that cannot be improved with query optimization or improved indexing. The entire buffer is allocated even if it is not all needed, so setting it larger than required globally will slow down most queries that sort. It is best to increase it as a session setting, and only for the sessions that need a larger size. On Linux, there are thresholds of 256KB and 2MB where larger values may significantly slow down memory allocation, so you should consider staying below one of those values. Experiment to find the best value for your workload. See Section B.4.3.5, “Where MySQL Stores Temporary Files”.

    The maximum permissible setting for sort_buffer_size is 4GB−1. Larger values are permitted for 64-bit platforms (except 64-bit Windows, for which large values are truncated to 4GB−1 with a warning).

  • sql_auto_is_null

    Property Value
    System Variable sql_auto_is_null
    Scope (>= 5.5.3) Global, Session
    Scope (<= 5.5.2) Session
    Dynamic Yes
    Type Boolean
    Default Value (>= 5.5.3) OFF
    Default Value (<= 5.5.2) ON

    If this variable is enabled, then after a statement that successfully inserts an automatically generated AUTO_INCREMENT value, you can find that value by issuing a statement of the following form:

    SELECT * FROM tbl_name WHERE auto_col IS NULL
    

    If the statement returns a row, the value returned is the same as if you invoked the LAST_INSERT_ID() function. For details, including the return value after a multiple-row insert, see Section 12.15, “Information Functions”. If no AUTO_INCREMENT value was successfully inserted, the SELECT statement returns no row.

    The behavior of retrieving an AUTO_INCREMENT value by using an IS NULL comparison is used by some ODBC programs, such as Access. See Obtaining Auto-Increment Values. This behavior can be disabled by setting sql_auto_is_null to OFF.

    The default value of sql_auto_is_null is OFF.

  • sql_big_selects

    Property Value
    System Variable sql_big_selects
    Scope (>= 5.5.3) Global, Session
    Scope (<= 5.5.2) Session
    Dynamic Yes
    Type Boolean
    Default Value ON

    If set to OFF, MySQL aborts SELECT statements that are likely to take a very long time to execute (that is, statements for which the optimizer estimates that the number of examined rows exceeds the value of max_join_size). This is useful when an inadvisable WHERE statement has been issued. The default value for a new connection is ON, which permits all SELECT statements.

    If you set the max_join_size system variable to a value other than DEFAULT, sql_big_selects is set to OFF.

  • sql_buffer_result

    Property Value
    System Variable sql_buffer_result
    Scope (>= 5.5.3) Global, Session
    Scope (<= 5.5.2) Session
    Dynamic Yes
    Type Boolean
    Default Value OFF

    If enabled, sql_buffer_result forces results from SELECT statements to be put into temporary tables. This helps MySQL free the table locks early and can be beneficial in cases where it takes a long time to send results to the client. The default value is OFF.

  • sql_log_bin

    Property Value
    System Variable sql_log_bin
    Scope (>= 5.5.41) Session
    Scope (>= 5.5.3, <= 5.5.40) Global, Session
    Scope (<= 5.5.2) Session
    Dynamic Yes
    Type Boolean
    Default Value ON

    This variable controls whether logging to the binary log is enabled for the current session (assuming that the binary log itself is enabled). The default value is ON. To disable or enable binary logging for the current session, set the session sql_log_bin variable to OFF or ON.

    Set this variable to OFF for a session to temporarily disable binary logging while making changes to the master you do not want replicated to the slave.

    Setting the session value of this system variable is a restricted operation. The session user must have privileges sufficient to set restricted session variables. See Section 5.1.8.1, “System Variable Privileges”.

    It is not possible to set the session value of sql_log_bin within a transaction or subquery.

    As of MySQL 5.5.41, the global sql_log_bin variable is read only and cannot be modified. The global scope is deprecated and will be removed in a future MySQL release. Prior to 5.5.41, sql_log_bin can be set as a global or session variable. Setting sql_log_bin globally is only detected when a new session is started. Any sessions previously running are not impacted when setting sql_log_bin globally.

    Warning

    Incorrect use of sql_log_bin with a global scope means any changes made in an already running session are still being recorded to the binary log and therefore replicated. Exercise extreme caution using sql_log_bin with a global scope as the above situation could cause unexpected results including replication failure.

  • sql_log_off

    Property Value
    System Variable sql_log_off
    Scope (>= 5.5.3) Global, Session
    Scope (<= 5.5.2) Session
    Dynamic Yes
    Type Boolean
    Default Value OFF
    Valid Values

    OFF (enable logging)

    ON (disable logging)

    This variable controls whether logging to the general query log is disabled for the current session (assuming that the general query log itself is enabled). The default value is OFF (that is, enable logging). To disable or enable general query logging for the current session, set the session sql_log_off variable to ON or OFF.

    Setting the session value of this system variable is a restricted operation. The session user must have privileges sufficient to set restricted session variables. See Section 5.1.8.1, “System Variable Privileges”.

  • sql_log_update

    Property Value
    Deprecated Yes (removed in 5.5.3); use sql_log_bin instead
    System Variable sql_log_update
    Scope Session
    Dynamic Yes
    Type Boolean

    This variable is deprecated, and is mapped to sql_log_bin. It was removed in MySQL 5.5.3.

  • sql_mode

    Property Value
    Command-Line Format --sql-mode=name
    System Variable sql_mode
    Scope Global, Session
    Dynamic Yes
    Type Set
    Default Value ''
    Valid Values

    ALLOW_INVALID_DATES

    ANSI_QUOTES

    ERROR_FOR_DIVISION_BY_ZERO

    HIGH_NOT_PRECEDENCE

    IGNORE_SPACE

    NO_AUTO_CREATE_USER

    NO_AUTO_VALUE_ON_ZERO

    NO_BACKSLASH_ESCAPES

    NO_DIR_IN_CREATE

    NO_ENGINE_SUBSTITUTION

    NO_FIELD_OPTIONS

    NO_KEY_OPTIONS

    NO_TABLE_OPTIONS

    NO_UNSIGNED_SUBTRACTION

    NO_ZERO_DATE

    NO_ZERO_IN_DATE

    ONLY_FULL_GROUP_BY

    PAD_CHAR_TO_FULL_LENGTH

    PIPES_AS_CONCAT

    REAL_AS_FLOAT

    STRICT_ALL_TABLES

    STRICT_TRANS_TABLES

    The current server SQL mode, which can be set dynamically. For details, see Section 5.1.10, “Server SQL Modes”.

    Note

    MySQL installation programs may configure the SQL mode during the installation process. If the SQL mode differs from the default or from what you expect, check for a setting in an option file that the server reads at startup.

  • sql_notes

    Property Value
    System Variable sql_notes
    Scope (>= 5.5.3) Global, Session
    Scope (<= 5.5.2) Session
    Dynamic Yes
    Type Boolean
    Default Value ON

    If enabled (the default), diagnostics of Note level increment warning_count and the server records them. If disabled, Note diagnostics do not increment warning_count and the server does not record them. mysqldump includes output to disable this variable so that reloading the dump file does not produce warnings for events that do not affect the integrity of the reload operation.

  • sql_quote_show_create

    Property Value
    System Variable sql_quote_show_create
    Scope (>= 5.5.3) Global, Session
    Scope (<= 5.5.2) Session
    Dynamic Yes
    Type Boolean
    Default Value ON

    If enabled (the default), the server quotes identifiers for SHOW CREATE TABLE and SHOW CREATE DATABASE statements. If disabled, quoting is disabled. This option is enabled by default so that replication works for identifiers that require quoting. See Section 13.7.5.12, “SHOW CREATE TABLE Statement”, and Section 13.7.5.8, “SHOW CREATE DATABASE Statement”.

  • sql_safe_updates

    Property Value
    System Variable sql_safe_updates
    Scope (>= 5.5.3) Global, Session
    Scope (<= 5.5.2) Session
    Dynamic Yes
    Type Boolean
    Default Value OFF

    If this variable is enabled, UPDATE and DELETE statements that do not use a key in the WHERE clause or a LIMIT clause produce an error. This makes it possible to catch UPDATE and DELETE statements where keys are not used properly and that would probably change or delete a large number of rows. The default value is OFF.

    For the mysql client, sql_safe_updates can be enabled by using the --safe-updates option. For more information, see Using Safe-Updates Mode (--safe-updates).

  • sql_select_limit

    Property Value
    System Variable sql_select_limit
    Scope Global, Session
    Dynamic Yes
    Type Integer

    The maximum number of rows to return from SELECT statements. For more information, see Using Safe-Updates Mode (--safe-updates).

    The default value for a new connection is the maximum number of rows that the server permits per table. Typical default values are (232)−1 or (264)−1. If you have changed the limit, the default value can be restored by assigning a value of DEFAULT.

    If a SELECT has a LIMIT clause, the LIMIT takes precedence over the value of sql_select_limit.

  • sql_warnings

    Property Value
    System Variable sql_warnings
    Scope (>= 5.5.3) Global, Session
    Scope (<= 5.5.2) Session
    Dynamic Yes
    Type Boolean
    Default Value OFF

    This variable controls whether single-row INSERT statements produce an information string if warnings occur. The default is OFF. Set the value to ON to produce an information string.

  • ssl_ca

    Property Value
    Command-Line Format --ssl-ca=file_name
    System Variable ssl_ca
    Scope Global
    Dynamic No
    Type File name

    The path to a file with a list of trusted SSL Certificate Authorities.

  • ssl_capath

    Property Value
    Command-Line Format --ssl-capath=dir_name
    System Variable ssl_capath
    Scope Global
    Dynamic No
    Type Directory name

    The path to a directory that contains trusted SSL CA certificates in PEM format. Support for this capability depends on the SSL library used to compile MySQL. See Section 6.3.4, “SSL Library-Dependent Capabilities”.

  • ssl_cert

    Property Value
    Command-Line Format --ssl-cert=file_name
    System Variable ssl_cert
    Scope Global
    Dynamic No
    Type File name

    The name of the SSL certificate file to use for establishing a secure connection.

  • ssl_cipher

    Property Value
    Command-Line Format --ssl-cipher=name
    System Variable ssl_cipher
    Scope Global
    Dynamic No
    Type String

    The list of permissible ciphers for SSL encryption.

  • ssl_key

    Property Value
    Command-Line Format --ssl-key=file_name
    System Variable ssl_key
    Scope Global
    Dynamic No
    Type File name

    The name of the SSL key file to use for establishing a secure connection.

  • storage_engine

    Property Value
    System Variable storage_engine
    Scope Global, Session
    Dynamic Yes
    Type Enumeration
    Default Value (>= 5.5.5) InnoDB
    Default Value (<= 5.5.4) MyISAM

    The default storage engine (table type). See Chapter 15, Alternative Storage Engines.

    This variable is deprecated as of MySQL 5.5.3. Use default_storage_engine instead.

  • stored_program_cache

    Property Value
    Command-Line Format --stored-program-cache=#
    Introduced 5.5.21
    System Variable stored_program_cache
    Scope Global
    Dynamic Yes
    Type Integer
    Default Value 256
    Minimum Value 256
    Maximum Value 524288

    Sets a soft upper limit for the number of cached stored routines per connection. The value of this variable is specified in terms of the number of stored routines held in each of the two caches maintained by the MySQL Server for, respectively, stored procedures and stored functions.

    Whenever a stored routine is executed this cache size is checked before the first or top-level statement in the routine is parsed; if the number of routines of the same type (stored procedures or stored functions according to which is being executed) exceeds the limit specified by this variable, the corresponding cache is flushed and memory previously allocated for cached objects is freed. This allows the cache to be flushed safely, even when there are dependencies between stored routines.

  • sync_frm

    Property Value
    Command-Line Format --sync-frm[={OFF|ON}]
    System Variable