Cari di MySQL 
    MySQL Manual
Daftar Isi
(Sebelumnya) 4.6. MySQL Administrative and ...5.1.4. Server System Variables (Berikutnya)

Chapter 5. MySQL Server Administration

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:

  • Server configuration.

  • The server log files.

  • Management of multiple servers on a single machine.

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.

  • The server shutdown process. There are performance and reliability considerations depending on the type of table (transactional or non-transactional) 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 Syntax".

5.1.1. Server Option and Variable Reference

The following table provides a list of all the command line options, server 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 notification of where each option/variable is valid. If a server option set on the command line or in an option file differs from the name of the corresponding server system or status variable, the variable name is noted immediately below the corresponding option. For status variables, the scope of the variable is shown (Scope) as either global, session, or both. Please see the corresponding sections for details on setting and using the options and variables. Where appropriate, a direct link to further information on the item as available.

For a version of this table that is specific to MySQL Cluster, see Section 17.3.4.1, "MySQL Cluster mysqld Option and Variable Reference".

Table 5.1. Option/Variable Summary

NameCmd-LineOption fileSystem VarStatus VarVar ScopeDynamic
abort-slave-event-countYesYes    
Aborted_clients   YesGlobalNo
Aborted_connects   YesGlobalNo
allow-suspicious-udfsYesYes    
ansiYesYes    
audit-logYesYes    
audit_log_buffer_size  Yes GlobalNo
audit_log_file  Yes GlobalNo
audit_log_flush  Yes GlobalYes
audit_log_policy  Yes GlobalYes
audit_log_rotate_on_size  Yes GlobalYes
audit_log_strategy  Yes GlobalNo
authentication_windows_log_levelYesYes    
authentication_windows_use_principal_nameYesYes    
auto_increment_incrementYesYesYes BothYes
auto_increment_offsetYesYesYes BothYes
autocommitYesYesYes BothYes
automatic_sp_privileges  Yes GlobalYes
back_logYesYesYes GlobalNo
basedirYesYesYes GlobalNo
big-tablesYesYes  BothYes
- Variable: big_tables  Yes BothYes
bind-addressYesYesYes GlobalNo
Binlog_cache_disk_use   YesGlobalNo
binlog_cache_sizeYesYesYes GlobalYes
Binlog_cache_use   YesGlobalNo
binlog_direct_non_transactional_updatesYesYesYes BothYes
binlog-do-dbYesYes    
binlog-formatYesYes  BothYes
- Variable: binlog_format  Yes BothYes
binlog-ignore-dbYesYes    
binlog-row-event-max-sizeYesYes    
Binlog_stmt_cache_disk_use   YesGlobalNo
binlog_stmt_cache_sizeYesYesYes GlobalYes
Binlog_stmt_cache_use   YesGlobalNo
bootstrapYesYes    
bulk_insert_buffer_sizeYesYesYes BothYes
Bytes_received   YesBothNo
Bytes_sent   YesBothNo
character_set_client  Yes BothYes
character-set-client-handshakeYesYes    
character_set_connection  Yes BothYes
character_set_database[a]  Yes BothYes
character-set-filesystemYesYes  BothYes
- Variable: character_set_filesystem  Yes BothYes
character_set_results  Yes BothYes
character-set-serverYesYes  BothYes
- Variable: character_set_server  Yes BothYes
character_set_system  Yes GlobalNo
character-sets-dirYesYes  GlobalNo
- Variable: character_sets_dir  Yes GlobalNo
chrootYesYes    
collation_connection  Yes BothYes
collation_database[b]  Yes BothYes
collation-serverYesYes  BothYes
- Variable: collation_server  Yes BothYes
Com_admin_commands   YesBothNo
Com_alter_db   YesBothNo
Com_alter_db_upgrade   YesBothNo
Com_alter_event   YesBothNo
Com_alter_function   YesBothNo
Com_alter_procedure   YesBothNo
Com_alter_server   YesBothNo
Com_alter_table   YesBothNo
Com_alter_tablespace   YesBothNo
Com_analyze   YesBothNo
Com_assign_to_keycache   YesBothNo
Com_begin   YesBothNo
Com_binlog   YesBothNo
Com_call_procedure   YesBothNo
Com_change_db   YesBothNo
Com_change_master   YesBothNo
Com_check   YesBothNo
Com_checksum   YesBothNo
Com_commit   YesBothNo
Com_create_db   YesBothNo
Com_create_event   YesBothNo
Com_create_function   YesBothNo
Com_create_index   YesBothNo
Com_create_procedure   YesBothNo
Com_create_server   YesBothNo
Com_create_table   YesBothNo
Com_create_trigger   YesBothNo
Com_create_udf   YesBothNo
Com_create_user   YesBothNo
Com_create_view   YesBothNo
Com_dealloc_sql   YesBothNo
Com_delete   YesBothNo
Com_delete_multi   YesBothNo
Com_do   YesBothNo
Com_drop_db   YesBothNo
Com_drop_event   YesBothNo
Com_drop_function   YesBothNo
Com_drop_index   YesBothNo
Com_drop_procedure   YesBothNo
Com_drop_server   YesBothNo
Com_drop_table   YesBothNo
Com_drop_trigger   YesBothNo
Com_drop_user   YesBothNo
Com_drop_view   YesBothNo
Com_empty_query   YesBothNo
Com_execute_sql   YesBothNo
Com_flush   YesBothNo
Com_grant   YesBothNo
Com_ha_close   YesBothNo
Com_ha_open   YesBothNo
Com_ha_read   YesBothNo
Com_help   YesBothNo
Com_insert   YesBothNo
Com_insert_select   YesBothNo
Com_install_plugin   YesBothNo
Com_kill   YesBothNo
Com_load   YesBothNo
Com_lock_tables   YesBothNo
Com_optimize   YesBothNo
Com_preload_keys   YesBothNo
Com_prepare_sql   YesBothNo
Com_purge   YesBothNo
Com_purge_before_date   YesBothNo
Com_release_savepoint   YesBothNo
Com_rename_table   YesBothNo
Com_rename_user   YesBothNo
Com_repair   YesBothNo
Com_replace   YesBothNo
Com_replace_select   YesBothNo
Com_reset   YesBothNo
Com_resignal   YesBothNo
Com_revoke   YesBothNo
Com_revoke_all   YesBothNo
Com_rollback   YesBothNo
Com_rollback_to_savepoint   YesBothNo
Com_savepoint   YesBothNo
Com_select   YesBothNo
Com_set_option   YesBothNo
Com_show_authors   YesBothNo
Com_show_binlog_events   YesBothNo
Com_show_binlogs   YesBothNo
Com_show_charsets   YesBothNo
Com_show_collations   YesBothNo
Com_show_contributors   YesBothNo
Com_show_create_db   YesBothNo
Com_show_create_event   YesBothNo
Com_show_create_func   YesBothNo
Com_show_create_proc   YesBothNo
Com_show_create_table   YesBothNo
Com_show_create_trigger   YesBothNo
Com_show_databases   YesBothNo
Com_show_engine_logs   YesBothNo
Com_show_engine_mutex   YesBothNo
Com_show_engine_status   YesBothNo
Com_show_errors   YesBothNo
Com_show_events   YesBothNo
Com_show_fields   YesBothNo
Com_show_function_code   YesBothNo
Com_show_function_status   YesBothNo
Com_show_grants   YesBothNo
Com_show_keys   YesBothNo
Com_show_logs   YesBothNo
Com_show_master_status   YesBothNo
Com_show_ndb_status   YesBothNo
Com_show_new_master   YesBothNo
Com_show_open_tables   YesBothNo
Com_show_plugins   YesBothNo
Com_show_privileges   YesBothNo
Com_show_procedure_code   YesBothNo
Com_show_procedure_status   YesBothNo
Com_show_processlist   YesBothNo
Com_show_profile   YesBothNo
Com_show_profiles   YesBothNo
Com_show_relaylog_events   YesBothNo
Com_show_slave_hosts   YesBothNo
Com_show_slave_status   YesBothNo
Com_show_status   YesBothNo
Com_show_storage_engines   YesBothNo
Com_show_table_status   YesBothNo
Com_show_tables   YesBothNo
Com_show_triggers   YesBothNo
Com_show_variables   YesBothNo
Com_show_warnings   YesBothNo
Com_signal   YesBothNo
Com_slave_start   YesBothNo
Com_slave_stop   YesBothNo
Com_stmt_close   YesBothNo
Com_stmt_execute   YesBothNo
Com_stmt_fetch   YesBothNo
Com_stmt_prepare   YesBothNo
Com_stmt_reprepare   YesBothNo
Com_stmt_reset   YesBothNo
Com_stmt_send_long_data   YesBothNo
Com_truncate   YesBothNo
Com_uninstall_plugin   YesBothNo
Com_unlock_tables   YesBothNo
Com_update   YesBothNo
Com_update_multi   YesBothNo
Com_xa_commit   YesBothNo
Com_xa_end   YesBothNo
Com_xa_prepare   YesBothNo
Com_xa_recover   YesBothNo
Com_xa_rollback   YesBothNo
Com_xa_start   YesBothNo
completion_typeYesYesYes BothYes
Compression   YesSessionNo
concurrent_insertYesYesYes GlobalYes
connect_timeoutYesYesYes GlobalYes
Connections   YesGlobalNo
consoleYesYes    
core-fileYesYes    
Created_tmp_disk_tables   YesBothNo
Created_tmp_files   YesGlobalNo
Created_tmp_tables   YesBothNo
datadirYesYesYes GlobalNo
date_format  Yes GlobalNo
datetime_format  Yes GlobalNo
debugYesYesYes BothYes
debug_sync  Yes SessionYes
debug-sync-timeoutYesYes    
default-storage-engineYesYes  BothYes
- Variable: default_storage_engine  Yes BothYes
default-time-zoneYesYes    
default_week_formatYesYesYes BothYes
defaults-extra-fileYes     
defaults-fileYes     
defaults-group-suffixYes     
delay-key-writeYesYes  GlobalYes
- Variable: delay_key_write  Yes GlobalYes
Delayed_errors   YesGlobalNo
delayed_insert_limitYesYesYes GlobalYes
Delayed_insert_threads   YesGlobalNo
delayed_insert_timeoutYesYesYes GlobalYes
delayed_queue_sizeYesYesYes GlobalYes
Delayed_writes   YesGlobalNo
des-key-fileYesYes    
disconnect-slave-event-countYesYes    
div_precision_incrementYesYesYes BothYes
enable-lockingYesYes    
enable-named-pipeYesYes    
- Variable: named_pipe      
enable-pstackYesYes    
engine-condition-pushdownYesYes  BothYes
- Variable: engine_condition_pushdown  Yes BothYes
error_count  Yes SessionNo
event-schedulerYesYes  GlobalYes
- Variable: event_scheduler  Yes GlobalYes
exit-infoYesYes    
expire_logs_daysYesYesYes GlobalYes
external-lockingYesYes    
- Variable: skip_external_locking      
external_user  Yes SessionNo
federatedYesYes    
flushYesYesYes GlobalYes
Flush_commands   YesGlobalNo
flush_timeYesYesYes GlobalYes
foreign_key_checks  Yes BothYes
ft_boolean_syntaxYesYesYes GlobalYes
ft_max_word_lenYesYesYes GlobalNo
ft_min_word_lenYesYesYes GlobalNo
ft_query_expansion_limitYesYesYes GlobalNo
ft_stopword_fileYesYesYes GlobalNo
gdbYesYes    
general-logYesYes  GlobalYes
- Variable: general_log  Yes GlobalYes
general_log_fileYesYesYes GlobalYes
group_concat_max_lenYesYesYes BothYes
Handler_commit   YesBothNo
Handler_delete   YesBothNo
Handler_discover   YesBothNo
Handler_prepare   YesBothNo
Handler_read_first   YesBothNo
Handler_read_key   YesBothNo
Handler_read_last   YesBothNo
Handler_read_next   YesBothNo
Handler_read_prev   YesBothNo
Handler_read_rnd   YesBothNo
Handler_read_rnd_next   YesBothNo
Handler_rollback   YesBothNo
Handler_savepoint   YesBothNo
Handler_savepoint_rollback   YesBothNo
Handler_update   YesBothNo
Handler_write   YesBothNo
have_compress  Yes GlobalNo
have_crypt  Yes GlobalNo
have_csv  Yes GlobalNo
have_dynamic_loading  Yes GlobalNo
have_geometry  Yes GlobalNo
have_innodb  Yes GlobalNo
have_ndbcluster  Yes GlobalNo
have_openssl  Yes GlobalNo
have_partitioning  Yes GlobalNo
have_profiling  Yes GlobalNo
have_query_cache  Yes GlobalNo
have_rtree_keys  Yes GlobalNo
have_ssl  Yes GlobalNo
have_symlink  Yes GlobalNo
helpYesYes    
hostname  Yes GlobalNo
identity  Yes SessionYes
ignore-builtin-innodbYesYes  GlobalNo
- Variable: ignore_builtin_innodb  Yes GlobalNo
init_connectYesYesYes GlobalYes
init-fileYesYes  GlobalNo
- Variable: init_file  Yes GlobalNo
init-rpl-roleYesYes    
init_slaveYesYesYes GlobalYes
innodbYesYes    
innodb_adaptive_flushingYesYesYes GlobalYes
innodb_adaptive_hash_indexYesYesYes GlobalYes
innodb_additional_mem_pool_sizeYesYesYes GlobalNo
innodb_autoextend_incrementYesYesYes GlobalYes
innodb_autoinc_lock_modeYesYesYes GlobalNo
innodb_buffer_pool_instancesYesYesYes GlobalNo
Innodb_buffer_pool_pages_data   YesGlobalNo
Innodb_buffer_pool_pages_dirty   YesGlobalNo
Innodb_buffer_pool_pages_flushed   YesGlobalNo
Innodb_buffer_pool_pages_free   YesGlobalNo
Innodb_buffer_pool_pages_latched   YesGlobalNo
Innodb_buffer_pool_pages_misc   YesGlobalNo
Innodb_buffer_pool_pages_total   YesGlobalNo
Innodb_buffer_pool_read_ahead   YesGlobalNo
Innodb_buffer_pool_read_ahead_evicted   YesGlobalNo
Innodb_buffer_pool_read_requests   YesGlobalNo
Innodb_buffer_pool_reads   YesGlobalNo
innodb_buffer_pool_sizeYesYesYes GlobalNo
Innodb_buffer_pool_wait_free   YesGlobalNo
Innodb_buffer_pool_write_requests   YesGlobalNo
innodb_change_bufferingYesYesYes GlobalYes
innodb_checksumsYesYesYes GlobalNo
innodb_commit_concurrencyYesYesYes GlobalYes
innodb_concurrency_ticketsYesYesYes GlobalYes
innodb_data_file_pathYesYesYes GlobalNo
Innodb_data_fsyncs   YesGlobalNo
innodb_data_home_dirYesYesYes GlobalNo
Innodb_data_pending_fsyncs   YesGlobalNo
Innodb_data_pending_reads   YesGlobalNo
Innodb_data_pending_writes   YesGlobalNo
Innodb_data_read   YesGlobalNo
Innodb_data_reads   YesGlobalNo
Innodb_data_writes   YesGlobalNo
Innodb_data_written   YesGlobalNo
Innodb_dblwr_pages_written   YesGlobalNo
Innodb_dblwr_writes   YesGlobalNo
innodb_doublewriteYesYesYes GlobalNo
innodb_fast_shutdownYesYesYes GlobalYes
innodb_file_formatYesYesYes GlobalYes
innodb_file_format_checkYesYesYes GlobalNo
innodb_file_format_maxYesYesYes GlobalYes
innodb_file_per_tableYesYesYes GlobalYes
innodb_flush_log_at_trx_commitYesYesYes GlobalYes
innodb_flush_methodYesYesYes GlobalNo
innodb_force_load_corruptedYesYesYes GlobalNo
innodb_force_recoveryYesYesYes GlobalNo
Innodb_have_atomic_builtins   YesGlobalNo
innodb_io_capacityYesYesYes GlobalYes
innodb_large_prefixYesYesYes GlobalYes
innodb_lock_wait_timeoutYesYesYes BothYes
innodb_locks_unsafe_for_binlogYesYesYes GlobalNo
innodb_log_buffer_sizeYesYesYes GlobalNo
innodb_log_file_sizeYesYesYes GlobalNo
innodb_log_files_in_groupYesYesYes GlobalNo
innodb_log_group_home_dirYesYesYes GlobalNo
Innodb_log_waits   YesGlobalNo
Innodb_log_write_requests   YesGlobalNo
Innodb_log_writes   YesGlobalNo
innodb_max_dirty_pages_pctYesYesYes GlobalYes
innodb_max_purge_lagYesYesYes GlobalYes
innodb_mirrored_log_groupsYesYesYes GlobalNo
innodb_old_blocks_pctYesYesYes GlobalYes
innodb_old_blocks_timeYesYesYes GlobalYes
innodb_open_filesYesYesYes GlobalNo
Innodb_os_log_fsyncs   YesGlobalNo
Innodb_os_log_pending_fsyncs   YesGlobalNo
Innodb_os_log_pending_writes   YesGlobalNo
Innodb_os_log_written   YesGlobalNo
Innodb_page_size   YesGlobalNo
Innodb_pages_created   YesGlobalNo
Innodb_pages_read   YesGlobalNo
Innodb_pages_written   YesGlobalNo
innodb_purge_batch_sizeYesYesYes GlobalNo
innodb_purge_threadsYesYesYes GlobalNo
innodb_read_ahead_thresholdYesYesYes GlobalYes
innodb_read_io_threadsYesYesYes GlobalNo
innodb_replication_delayYesYesYes GlobalYes
innodb_rollback_on_timeoutYesYesYes GlobalNo
innodb_rollback_segmentsYesYesYes GlobalYes
Innodb_row_lock_current_waits   YesGlobalNo
Innodb_row_lock_time   YesGlobalNo
Innodb_row_lock_time_avg   YesGlobalNo
Innodb_row_lock_time_max   YesGlobalNo
Innodb_row_lock_waits   YesGlobalNo
Innodb_rows_deleted   YesGlobalNo
Innodb_rows_inserted   YesGlobalNo
Innodb_rows_read   YesGlobalNo
Innodb_rows_updated   YesGlobalNo
innodb_spin_wait_delayYesYesYes GlobalYes
innodb_stats_methodYesYesYes GlobalYes
innodb_stats_on_metadataYesYesYes GlobalYes
innodb_stats_sample_pagesYesYesYes GlobalYes
innodb-status-fileYesYes    
innodb_strict_modeYesYesYes BothYes
innodb_support_xaYesYesYes BothYes
innodb_sync_spin_loopsYesYesYes GlobalYes
innodb_table_locksYesYesYes BothYes
innodb_thread_concurrencyYesYesYes GlobalYes
innodb_thread_sleep_delayYesYesYes GlobalYes
Innodb_truncated_status_writes   YesGlobalNo
innodb_use_native_aioYesYesYes GlobalNo
innodb_use_sys_mallocYesYesYes GlobalNo
innodb_version  Yes GlobalNo
innodb_write_io_threadsYesYesYes GlobalNo
insert_id  Yes SessionYes
installYes     
install-manualYes     
interactive_timeoutYesYesYes BothYes
join_buffer_sizeYesYesYes BothYes
keep_files_on_createYesYesYes BothYes
Key_blocks_not_flushed   YesGlobalNo
Key_blocks_unused   YesGlobalNo
Key_blocks_used   YesGlobalNo
key_buffer_sizeYesYesYes GlobalYes
key_cache_age_thresholdYesYesYes GlobalYes
key_cache_block_sizeYesYesYes GlobalYes
key_cache_division_limitYesYesYes GlobalYes
Key_read_requests   YesGlobalNo
Key_reads   YesGlobalNo
Key_write_requests   YesGlobalNo
Key_writes   YesGlobalNo
languageYesYesYes GlobalNo
large_files_support  Yes GlobalNo
large_page_size  Yes GlobalNo
large-pagesYesYes  GlobalNo
- Variable: large_pages  Yes GlobalNo
last_insert_id  Yes SessionYes
Last_query_cost   YesSessionNo
lc-messagesYesYes  BothYes
- Variable: lc_messages  Yes BothYes
lc-messages-dirYesYes  GlobalNo
- Variable: lc_messages_dir  Yes GlobalNo
lc_time_names  Yes BothYes
license  Yes GlobalNo
local_infile  Yes GlobalYes
lock_wait_timeoutYesYesYes BothYes
locked_in_memory  Yes GlobalNo
logYesYesYes GlobalYes
log_bin  Yes GlobalNo
log-binYesYesYes GlobalNo
log-bin-indexYesYes    
log-bin-trust-function-creatorsYesYes  GlobalYes
- Variable: log_bin_trust_function_creators  Yes GlobalYes
log-bin-trust-routine-creatorsYesYes  GlobalYes
- Variable: log_bin_trust_routine_creators  Yes GlobalYes
log_bin_use_v1_row_eventsYesYesYes GlobalNo
log-bin-use-v1-row-eventsYesYes  GlobalNo
- Variable: log_bin_use_v1_row_events  Yes GlobalNo
log-errorYesYes  GlobalNo
- Variable: log_error  Yes GlobalNo
log-isamYesYes    
log-outputYesYes  GlobalYes
- Variable: log_output  Yes GlobalYes
log-queries-not-using-indexesYesYes  GlobalYes
- Variable: log_queries_not_using_indexes  Yes GlobalYes
log-short-formatYesYes    
log-slave-updatesYesYes  GlobalNo
- Variable: log_slave_updates  Yes GlobalNo
log_slave_updatesYesYesYes GlobalNo
log-slow-admin-statementsYesYes    
log-slow-queriesYesYes  GlobalYes
- Variable: log_slow_queries  Yes GlobalYes
log-slow-slave-statementsYesYes    
log-tcYesYes    
log-tc-sizeYesYes    
log-warningsYesYes  BothYes
- Variable: log_warnings  Yes BothYes
long_query_timeYesYesYes BothYes
low-priority-updatesYesYes  BothYes
- Variable: low_priority_updates  Yes BothYes
lower_case_file_systemYesYesYes GlobalNo
lower_case_table_namesYesYesYes GlobalNo
master-connect-retryYesYes    
master-hostYesYes    
master-info-fileYesYes    
master-passwordYesYes    
master-portYesYes    
master-retry-countYesYes    
master-sslYesYes    
master-ssl-caYesYes    
master-ssl-capathYesYes    
master-ssl-certYesYes    
master-ssl-cipherYesYes    
master-ssl-keyYesYes    
master-userYesYes    
max_allowed_packetYesYesYes GlobalYes
max_binlog_cache_sizeYesYesYes GlobalYes
max-binlog-dump-eventsYesYes    
max_binlog_sizeYesYesYes GlobalYes
max_binlog_stmt_cache_sizeYesYesYes GlobalYes
max_connect_errorsYesYesYes GlobalYes
max_connectionsYesYesYes GlobalYes
max_delayed_threadsYesYesYes BothYes
max_error_countYesYesYes BothYes
max_heap_table_sizeYesYesYes BothYes
max_insert_delayed_threads  Yes BothYes
max_join_sizeYesYesYes BothYes
max_length_for_sort_dataYesYesYes BothYes
max_long_data_sizeYesYesYes GlobalNo
max_prepared_stmt_countYesYesYes GlobalYes
max_relay_log_sizeYesYesYes GlobalYes
max_seeks_for_keyYesYesYes BothYes
max_sort_lengthYesYesYes BothYes
max_sp_recursion_depthYesYesYes BothYes
Max_used_connections   YesGlobalNo
max_user_connectionsYesYesYes BothYes
max_write_lock_countYesYesYes GlobalYes
memlockYesYesYes GlobalNo
metadata_locks_cache_size  Yes GlobalNo
min-examined-row-limitYesYesYes BothYes
myisam-block-sizeYesYes    
myisam_data_pointer_sizeYesYesYes GlobalYes
myisam_max_sort_file_sizeYesYesYes GlobalYes
myisam_mmap_sizeYesYesYes GlobalNo
myisam-recoverYesYes    
- Variable: myisam_recover_options      
myisam-recover-optionsYesYes    
- Variable: myisam_recover_options      
myisam_recover_options  Yes GlobalNo
myisam_repair_threadsYesYesYes BothYes
myisam_sort_buffer_sizeYesYesYes BothYes
myisam_stats_methodYesYesYes BothYes
myisam_use_mmapYesYesYes GlobalYes
named_pipe  Yes GlobalNo
Ndb_api_bytes_received_count   YesGlobalNo
Ndb_api_bytes_received_count_session   YesSessionNo
Ndb_api_bytes_received_count_slave   YesGlobalNo
Ndb_api_bytes_sent_count   YesGlobalNo
Ndb_api_bytes_sent_count_session   YesSessionNo
Ndb_api_bytes_sent_count_slave   YesGlobalNo
Ndb_api_event_bytes_count   YesGlobalNo
Ndb_api_event_bytes_count_injector   YesGlobalNo
Ndb_api_event_data_count   YesGlobalNo
Ndb_api_event_data_count_injector   YesGlobalNo
Ndb_api_event_nondata_count   YesGlobalNo
Ndb_api_event_nondata_count_injector   YesGlobalNo
Ndb_api_pk_op_count   YesGlobalNo
Ndb_api_pk_op_count_session   YesSessionNo
Ndb_api_pk_op_count_slave   YesGlobalNo
Ndb_api_pruned_scan_count   YesGlobalNo
Ndb_api_pruned_scan_count_session   YesSessionNo
Ndb_api_pruned_scan_count_slave   YesGlobalNo
Ndb_api_range_scan_count   YesGlobalNo
Ndb_api_range_scan_count_session   YesSessionNo
Ndb_api_range_scan_count_slave   YesGlobalNo
Ndb_api_read_row_count   YesGlobalNo
Ndb_api_read_row_count_session   YesSessionNo
Ndb_api_read_row_count_slave   YesGlobalNo
Ndb_api_scan_batch_count   YesGlobalNo
Ndb_api_scan_batch_count_session   YesSessionNo
Ndb_api_scan_batch_count_slave   YesGlobalNo
Ndb_api_table_scan_count   YesGlobalNo
Ndb_api_table_scan_count_session   YesSessionNo
Ndb_api_table_scan_count_slave   YesGlobalNo
Ndb_api_trans_abort_count   YesGlobalNo
Ndb_api_trans_abort_count_session   YesSessionNo
Ndb_api_trans_abort_count_slave   YesGlobalNo
Ndb_api_trans_close_count   YesGlobalNo
Ndb_api_trans_close_count_session   YesSessionNo
Ndb_api_trans_close_count_slave   YesGlobalNo
Ndb_api_trans_commit_count   YesGlobalNo
Ndb_api_trans_commit_count_session   YesSessionNo
Ndb_api_trans_commit_count_slave   YesGlobalNo
Ndb_api_trans_local_read_row_count   YesGlobalNo
Ndb_api_trans_local_read_row_count_session   YesSessionNo
Ndb_api_trans_local_read_row_count_slave   YesGlobalNo
Ndb_api_trans_start_count   YesGlobalNo
Ndb_api_trans_start_count_session   YesSessionNo
Ndb_api_trans_start_count_slave   YesGlobalNo
Ndb_api_uk_op_count   YesGlobalNo
Ndb_api_uk_op_count_session   YesSessionNo
Ndb_api_uk_op_count_slave   YesGlobalNo
Ndb_api_wait_exec_complete_count   YesGlobalNo
Ndb_api_wait_exec_complete_count_session   YesSessionNo
Ndb_api_wait_exec_complete_count_slave   YesGlobalNo
Ndb_api_wait_meta_request_count   YesGlobalNo
Ndb_api_wait_meta_request_count_session   YesSessionNo
Ndb_api_wait_meta_request_count_slave   YesGlobalNo
Ndb_api_wait_nanos_count   YesGlobalNo
Ndb_api_wait_nanos_count_session   YesSessionNo
Ndb_api_wait_nanos_count_slave   YesGlobalNo
Ndb_api_wait_scan_result_count   YesGlobalNo
Ndb_api_wait_scan_result_count_session   YesSessionNo
Ndb_api_wait_scan_result_count_slave   YesGlobalNo
ndb_autoincrement_prefetch_szYesYesYes BothYes
ndb-batch-sizeYesYesYes GlobalNo
ndb-blob-read-batch-bytesYesYesYes BothYes
ndb-blob-write-batch-bytesYesYesYes BothYes
ndb_cache_check_timeYesYesYes GlobalYes
ndb-cluster-connection-poolYesYesYesYesGlobalNo
Ndb_cluster_node_id   YesBothNo
Ndb_config_from_host   YesBothNo
Ndb_conflict_fn_epoch   YesGlobalNo
Ndb_conflict_fn_epoch_trans   YesGlobalNo
Ndb_conflict_fn_max   YesGlobalNo
Ndb_conflict_fn_old   YesGlobalNo
Ndb_conflict_trans_conflict_commit_count   YesGlobalNo
Ndb_conflict_trans_detect_iter_count   YesGlobalNo
Ndb_conflict_trans_reject_count   YesGlobalNo
Ndb_conflict_trans_row_conflict_count   YesGlobalNo
Ndb_conflict_trans_row_reject_count   YesGlobalNo
ndb-connectstringYesYes    
ndb-deferred-constraintsYesYes  BothYes
- Variable: ndb_deferred_constraints  Yes BothYes
ndb_deferred_constraintsYesYesYes BothYes
ndb_distributionYesYesYes BothYes
ndb-distributionYesYes  BothYes
- Variable: ndb_distribution  Yes BothYes
ndb_execute_count   YesGlobalNo
ndb_extra_loggingYesYesYes GlobalYes
ndb_force_sendYesYesYes BothYes
ndb_join_pushdown  Yes GlobalNo
ndb-log-apply-statusYesYes  GlobalNo
- Variable: ndb_log_apply_status  Yes GlobalNo
ndb_log_binYes Yes BothYes
ndb_log_binlog_indexYes Yes GlobalYes
ndb_log_empty_epochsYesYesYes GlobalYes
ndb-log-empty-epochsYesYesYes GlobalYes
ndb_log_orig  Yes GlobalNo
ndb-log-transaction-idYesYes  GlobalNo
- Variable: ndb_log_transaction_id  Yes GlobalNo
ndb_log_transaction_id  Yes GlobalNo
ndb-log-update-as-writeYesYesYes GlobalYes
ndb_log_updated_onlyYesYesYes GlobalYes
ndb-mgmd-hostYesYes    
ndb-nodeidYesYes YesGlobalNo
Ndb_number_of_data_nodes   YesGlobalNo
ndb_optimization_delay  Yes GlobalYes
ndb_optimized_node_selectionYesYes    
ndb_pruned_scan_count   YesGlobalNo
Ndb_pushed_queries_defined   YesGlobalNo
Ndb_pushed_queries_dropped   YesGlobalNo
Ndb_pushed_queries_executed   YesGlobalNo
ndb_pushed_reads   YesGlobalNo
ndb_report_thresh_binlog_epoch_slipYesYes    
ndb_report_thresh_binlog_mem_usageYesYes    
ndb_scan_count   YesGlobalNo
ndb_table_no_logging  Yes SessionYes
ndb_table_temporary  Yes SessionYes
ndb-transid-mysql-connection-mapYes     
ndb_use_copying_alter_table  Yes BothNo
ndb_use_exact_count  Yes BothYes
ndb_use_transactionsYesYesYes BothYes
ndb-wait-connectedYesYesYes GlobalNo
ndb-wait-setupYesYesYes GlobalNo
ndbclusterYesYes    
- Variable: have_ndbcluster      
ndbinfo_database  Yes GlobalNo
ndbinfo_max_bytesYes Yes BothYes
ndbinfo_max_rowsYes Yes BothYes
ndbinfo_show_hiddenYes Yes BothYes
ndbinfo_table_prefixYes Yes BothYes
ndbinfo_version  Yes GlobalNo
net_buffer_lengthYesYesYes BothYes
net_read_timeoutYesYesYes BothYes
net_retry_countYesYesYes BothYes
net_write_timeoutYesYesYes BothYes
newYesYesYes BothYes
no-defaultsYes     
Not_flushed_delayed_rows   YesGlobalNo
oldYesYesYes GlobalNo
old-alter-tableYesYes  BothYes
- Variable: old_alter_table  Yes BothYes
old_passwords  Yes BothYes
old-style-user-limitsYesYes    
one-threadYesYes    
Open_files   YesGlobalNo
open-files-limitYesYes  GlobalNo
- Variable: open_files_limit  Yes GlobalNo
Open_streams   YesGlobalNo
Open_table_definitions   YesGlobalNo
Open_tables   YesBothNo
Opened_files   YesGlobalNo
Opened_table_definitions   YesBothNo
Opened_tables   YesBothNo
optimizer_prune_levelYesYesYes BothYes
optimizer_search_depthYesYesYes BothYes
optimizer_switchYesYesYes BothYes
partitionYesYes  GlobalNo
- Variable: have_partitioning  Yes GlobalNo
performance_schemaYesYesYes GlobalNo
Performance_schema_cond_classes_lost   YesGlobalNo
Performance_schema_cond_instances_lost   YesGlobalNo
performance_schema_events_waits_history_long_sizeYesYesYes GlobalNo
performance_schema_events_waits_history_sizeYesYesYes GlobalNo
Performance_schema_file_classes_lost   YesGlobalNo
Performance_schema_file_handles_lost   YesGlobalNo
Performance_schema_file_instances_lost   YesGlobalNo
Performance_schema_locker_lost   YesGlobalNo
performance_schema_max_cond_classesYesYesYes GlobalNo
performance_schema_max_cond_instancesYesYesYes GlobalNo
performance_schema_max_file_classesYesYesYes GlobalNo
performance_schema_max_file_handlesYesYesYes GlobalNo
performance_schema_max_file_instancesYesYesYes GlobalNo
performance_schema_max_mutex_classesYesYesYes GlobalNo
performance_schema_max_mutex_instancesYesYesYes GlobalNo
performance_schema_max_rwlock_classesYesYesYes GlobalNo
performance_schema_max_rwlock_instancesYesYesYes GlobalNo
performance_schema_max_table_handlesYesYesYes GlobalNo
performance_schema_max_table_instancesYesYesYes GlobalNo
performance_schema_max_thread_classesYesYesYes GlobalNo
performance_schema_max_thread_instancesYesYesYes GlobalNo
Performance_schema_mutex_classes_lost   YesGlobalNo
Performance_schema_mutex_instances_lost   YesGlobalNo
Performance_schema_rwlock_classes_lost   YesGlobalNo
Performance_schema_rwlock_instances_lost   YesGlobalNo
Performance_schema_table_handles_lost   YesGlobalNo
Performance_schema_table_instances_lost   YesGlobalNo
Performance_schema_thread_classes_lost   YesGlobalNo
Performance_schema_thread_instances_lost   YesGlobalNo
pid-fileYesYes  GlobalNo
- Variable: pid_file  Yes GlobalNo
pluginYesYes    
plugin_dirYesYesYes GlobalNo
plugin-loadYesYes    
portYesYesYes GlobalNo
port-open-timeoutYesYes    
preload_buffer_sizeYesYesYes BothYes
Prepared_stmt_count   YesGlobalNo
print-defaultsYes     
profiling  Yes BothYes
profiling_history_sizeYesYesYes BothYes
protocol_version  Yes GlobalNo
proxy_user  Yes SessionNo
pseudo_thread_id  Yes SessionYes
Qcache_free_blocks   YesGlobalNo
Qcache_free_memory   YesGlobalNo
Qcache_hits   YesGlobalNo
Qcache_inserts   YesGlobalNo
Qcache_lowmem_prunes   YesGlobalNo
Qcache_not_cached   YesGlobalNo
Qcache_queries_in_cache   YesGlobalNo
Qcache_total_blocks   YesGlobalNo
Queries   YesBothNo
query_alloc_block_sizeYesYesYes BothYes
query_cache_limitYesYesYes GlobalYes
query_cache_min_res_unitYesYesYes GlobalYes
query_cache_sizeYesYesYes GlobalYes
query_cache_typeYesYesYes BothYes
query_cache_wlock_invalidateYesYesYes BothYes
query_prealloc_sizeYesYesYes BothYes
Questions   YesBothNo
rand_seed1  Yes SessionYes
rand_seed2  Yes SessionYes
range_alloc_block_sizeYesYesYes BothYes
read_buffer_sizeYesYesYes BothYes
read_onlyYesYesYes GlobalYes
read_rnd_buffer_sizeYesYesYes BothYes
relay-logYesYes  GlobalNo
- Variable: relay_log  Yes GlobalNo
relay-log-indexYesYes  GlobalNo
- Variable: relay_log_index  Yes GlobalNo
relay_log_indexYesYesYes GlobalNo
relay-log-info-fileYesYes    
- Variable: relay_log_info_file      
relay_log_info_fileYesYesYes GlobalNo
relay_log_purgeYesYesYes GlobalYes
relay_log_recoveryYesYesYes GlobalNo
relay-log-recoveryYesYes    
- Variable: relay_log_recovery      
relay_log_space_limitYesYesYes GlobalNo
removeYes     
replicate-do-dbYesYes    
replicate-do-tableYesYes    
replicate-ignore-dbYesYes    
replicate-ignore-tableYesYes    
replicate-rewrite-dbYesYes    
replicate-same-server-idYesYes    
replicate-wild-do-tableYesYes    
replicate-wild-ignore-tableYesYes    
report-hostYesYes  GlobalNo
- Variable: report_host  Yes GlobalNo
report-passwordYesYes  GlobalNo
- Variable: report_password  Yes GlobalNo
report-portYesYes  GlobalNo
- Variable: report_port  Yes GlobalNo
report-userYesYes  GlobalNo
- Variable: report_user  Yes GlobalNo
rpl_recovery_rank  Yes GlobalYes
Rpl_semi_sync_master_clients   YesGlobalNo
rpl_semi_sync_master_enabled  Yes GlobalYes
Rpl_semi_sync_master_net_avg_wait_time   YesGlobalNo
Rpl_semi_sync_master_net_wait_time   YesGlobalNo
Rpl_semi_sync_master_net_waits   YesGlobalNo
Rpl_semi_sync_master_no_times   YesGlobalNo
Rpl_semi_sync_master_no_tx   YesGlobalNo
Rpl_semi_sync_master_status   YesGlobalNo
Rpl_semi_sync_master_timefunc_failures   YesGlobalNo
rpl_semi_sync_master_timeout  Yes GlobalYes
rpl_semi_sync_master_trace_level  Yes GlobalYes
Rpl_semi_sync_master_tx_avg_wait_time   YesGlobalNo
Rpl_semi_sync_master_tx_wait_time   YesGlobalNo
Rpl_semi_sync_master_tx_waits   YesGlobalNo
rpl_semi_sync_master_wait_no_slave  Yes GlobalYes
Rpl_semi_sync_master_wait_pos_backtraverse   YesGlobalNo
Rpl_semi_sync_master_wait_sessions   YesGlobalNo
Rpl_semi_sync_master_yes_tx   YesGlobalNo
rpl_semi_sync_slave_enabled  Yes GlobalYes
Rpl_semi_sync_slave_status   YesGlobalNo
rpl_semi_sync_slave_trace_level  Yes GlobalYes
Rpl_status   YesGlobalNo
safe-modeYesYes    
safe-show-databaseYesYesYes GlobalYes
safe-user-createYesYes    
safemalloc-mem-limitYesYes    
secure-authYesYes  GlobalYes
- Variable: secure_auth  Yes GlobalYes
secure-file-privYesYes  GlobalNo
- Variable: secure_file_priv  Yes GlobalNo
Select_full_join   YesBothNo
Select_full_range_join   YesBothNo
Select_range   YesBothNo
Select_range_check   YesBothNo
Select_scan   YesBothNo
server-idYesYes  GlobalYes
- Variable: server_id  Yes GlobalYes
server-id-bitsYesYes  GlobalNo
- Variable: server_id_bits  Yes GlobalNo
shared_memory  Yes GlobalNo
shared_memory_base_name  Yes GlobalNo
show-slave-auth-infoYesYes    
skip-character-set-client-handshakeYesYes    
skip-concurrent-insertYesYes    
- Variable: concurrent_insert      
skip-event-schedulerYesYes    
skip-external-lockingYesYes  GlobalNo
- Variable: skip_external_locking  Yes GlobalNo
skip-grant-tablesYesYes    
skip-host-cacheYesYes    
skip-lockingYesYes    
skip-log-warningsYes     
skip-name-resolveYesYes  GlobalNo
- Variable: skip_name_resolve  Yes GlobalNo
skip-ndbclusterYesYes    
skip-networkingYesYes  GlobalNo
- Variable: skip_networking  Yes GlobalNo
skip-newYesYes    
skip-partitionYesYes    
skip-safemallocYesYes    
skip-show-databaseYesYes  GlobalNo
- Variable: skip_show_database  Yes GlobalNo
skip-slave-startYesYes    
skip-sslYesYes    
skip-stack-traceYesYes    
skip-symbolic-linksYes     
skip-symlinkYesYes    
skip-thread-priorityYesYes    
slave_allow_batchingYesYesYes GlobalYes
slave_compressed_protocolYesYesYes GlobalYes
slave_exec_modeYesYesYes GlobalYes
Slave_heartbeat_period   YesGlobalNo
slave-load-tmpdirYesYes  GlobalNo
- Variable: slave_load_tmpdir  Yes GlobalNo
slave_max_allowed_packet  Yes GlobalYes
slave-max-allowed-packetYesYes    
- Variable: slave_max_allowed_packet      
slave-net-timeoutYesYes  GlobalYes
- Variable: slave_net_timeout  Yes GlobalYes
Slave_open_temp_tables   YesGlobalNo
Slave_received_heartbeats   YesGlobalNo
Slave_retried_transactions   YesGlobalNo
Slave_running   YesGlobalNo
slave-skip-errorsYesYes  GlobalNo
- Variable: slave_skip_errors  Yes GlobalNo
slave_transaction_retriesYesYesYes GlobalYes
slave_type_conversionsYesYesYes GlobalNo
Slow_launch_threads   YesBothNo
slow_launch_timeYesYesYes GlobalYes
Slow_queries   YesBothNo
slow-query-logYesYes  GlobalYes
- Variable: slow_query_log  Yes GlobalYes
slow_query_log_fileYesYesYes GlobalYes
slow-start-timeoutYesYes    
socketYesYesYes GlobalNo
sort_buffer_sizeYesYesYes BothYes
Sort_merge_passes   YesBothNo
Sort_range   YesBothNo
Sort_rows   YesBothNo
Sort_scan   YesBothNo
sporadic-binlog-dump-failYesYes    
sql_auto_is_null  Yes BothYes
sql_big_selects  Yes BothYes
sql_big_tables  Yes BothYes
sql_buffer_result  Yes BothYes
sql_log_bin  Yes BothYes
sql_log_off  Yes BothYes
sql_log_update  Yes SessionYes
sql_low_priority_updates  Yes BothYes
sql_max_join_size  Yes BothYes
sql-modeYesYes  BothYes
- Variable: sql_mode  Yes BothYes
sql_notes  Yes BothYes
sql_quote_show_create  Yes BothYes
sql_safe_updates  Yes BothYes
sql_select_limit  Yes BothYes
sql_slave_skip_counter  Yes GlobalYes
sql_warnings  Yes BothYes
sslYesYes    
Ssl_accept_renegotiates   YesGlobalNo
Ssl_accepts   YesGlobalNo
ssl-caYesYes  GlobalNo
- Variable: ssl_ca  Yes GlobalNo
Ssl_callback_cache_hits   YesGlobalNo
ssl-capathYesYes  GlobalNo
- Variable: ssl_capath  Yes GlobalNo
ssl-certYesYes  GlobalNo
- Variable: ssl_cert  Yes GlobalNo
ssl-cipherYesYes  GlobalNo
- Variable: ssl_cipher  Yes GlobalNo
Ssl_cipher   YesBothNo
Ssl_cipher_list   YesBothNo
Ssl_client_connects   YesGlobalNo
Ssl_connect_renegotiates   YesGlobalNo
Ssl_ctx_verify_depth   YesGlobalNo
Ssl_ctx_verify_mode   YesGlobalNo
Ssl_default_timeout   YesBothNo
Ssl_finished_accepts   YesGlobalNo
Ssl_finished_connects   YesGlobalNo
ssl-keyYesYes  GlobalNo
- Variable: ssl_key  Yes GlobalNo
Ssl_session_cache_hits   YesGlobalNo
Ssl_session_cache_misses   YesGlobalNo
Ssl_session_cache_mode   YesGlobalNo
Ssl_session_cache_overflows   YesGlobalNo
Ssl_session_cache_size   YesGlobalNo
Ssl_session_cache_timeouts   YesGlobalNo
Ssl_sessions_reused   YesBothNo
Ssl_used_session_cache_entries   YesGlobalNo
Ssl_verify_depth   YesBothNo
Ssl_verify_mode   YesBothNo
ssl-verify-server-certYesYes    
Ssl_version   YesBothNo
standaloneYesYes    
storage_engine  Yes BothYes
stored_program_cacheYesYesYes GlobalYes
symbolic-linksYesYes    
sync_binlogYesYesYes GlobalYes
sync_frmYesYesYes GlobalYes
sync_master_infoYesYesYes GlobalYes
sync_relay_logYesYesYes GlobalYes
sync_relay_log_infoYesYesYes GlobalYes
sysdate-is-nowYesYes    
system_time_zone  Yes GlobalNo
table_definition_cacheYesYesYes GlobalYes
table_lock_wait_timeoutYesYesYes GlobalYes
Table_locks_immediate   YesGlobalNo
Table_locks_waited   YesGlobalNo
table_open_cacheYesYesYes GlobalYes
table_type  Yes BothYes
tc-heuristic-recoverYesYes    
Tc_log_max_pages_used   YesGlobalNo
Tc_log_page_size   YesGlobalNo
Tc_log_page_waits   YesGlobalNo
temp-poolYesYes    
thread_cache_sizeYesYesYes GlobalYes
thread_concurrencyYesYesYes GlobalNo
thread_handlingYesYesYes GlobalNo
thread_pool_algorithmYesYesYes GlobalNo
thread_pool_high_priority_connectionYesYesYes BothYes
thread_pool_max_unused_threadsYesYesYes GlobalYes
thread_pool_prio_kickup_timerYesYesYes BothYes
thread_pool_sizeYesYesYes GlobalNo
thread_pool_stall_limitYesYesYes GlobalYes
thread_stackYesYesYes GlobalNo
Threads_cached   YesGlobalNo
Threads_connected   YesGlobalNo
Threads_created   YesGlobalNo
Threads_running   YesGlobalNo
time_format  Yes GlobalNo
time_zoneYesYesYes BothYes
timed_mutexesYesYesYes GlobalYes
timestamp  Yes SessionYes
tmp_table_sizeYesYesYes BothYes
tmpdirYesYesYes GlobalNo
transaction_alloc_block_sizeYesYesYes BothYes
transaction-isolationYesYes    
- Variable: tx_isolation      
transaction_prealloc_sizeYesYesYes BothYes
tx_isolation  Yes BothYes
unique_checks  Yes BothYes
updatable_views_with_limitYesYesYes BothYes
Uptime   YesGlobalNo
Uptime_since_flush_status   YesGlobalNo
userYesYes    
verboseYesYes    
version  Yes GlobalNo
version_comment  Yes GlobalNo
version_compile_machine  Yes GlobalNo
version_compile_os  Yes GlobalNo
wait_timeoutYesYesYes BothYes
warning_count  Yes SessionNo

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

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


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.3, "Server Command Options", and Section 5.1.4, "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.3.3, "Using Option Files". That section also describes option file format and syntax.

5.1.3. Server Command Options

When you start the mysqld server, you can specify program options using any of the methods described in Section 4.2.3, "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.3.3, "Using Option Files".

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 mysqld --help. To see the full list, use mysqld --verbose --help.

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

You can also set the values of server system variables by using variable names as options, as described at the end of this section.

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.

  • --help, -?

    Command-Line Format-?
    --help
    Option-File Formathelp

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

  • --allow-suspicious-udfs

    Command-Line Format--allow-suspicious-udfs
    Option-File Formatallow-suspicious-udfs
     Permitted Values
    Typeboolean
    DefaultFALSE

    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 Section 23.3.2.6, "User-Defined Function Security Precautions".

  • --ansi

    Command-Line Format--ansi
    -a
    Option-File Formatansi

    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.8.3, "Running MySQL in ANSI Mode", and Section 5.1.7, "Server SQL Modes".

  • --basedir=path, -b path

    Command-Line Format--basedir=path
    -b
    Option-File Formatbasedir
    Option Sets VariableYes, basedir
    Variable Namebasedir
    Variable ScopeGlobal
    Dynamic VariableNo
     Permitted Values
    Typefile name

    The path to the MySQL installation directory. All paths are usually resolved relative to this directory.

  • --big-tables

    Command-Line Format--big-tables
    Option-File Formatbig-tables
    Option Sets VariableYes, big_tables
    Variable Namebig-tables
    Variable ScopeGlobal, Session
    Dynamic VariableYes
     Permitted Values
    Typeboolean

    Enable large result sets by saving all temporary sets in files. This option prevents most "table full" errors, but also slows down queries for which in-memory tables would suffice. Since MySQL 3.23.2, the server is able to handle large result sets automatically by using memory for small temporary tables and switching to disk tables where necessary.

  • --bind-address=addr

    Command-Line Format--bind-address=addr
    Option-File Formatbind-address=addr
    Variable Namebind-address
    Variable ScopeGlobal
    Dynamic VariableNo

    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. (IPv6 addresses are not supported before MySQL 5.5.3.) If addr is a host name, the server resolves the name to an IP address and binds to that address.

    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 you intend to bind the server to a specific address, be sure that the mysql.user grant 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.

  • --binlog-format={ROW|STATEMENT|MIXED}

    Command-Line Format--binlog-format=format
    Option-File Formatbinlog-format=format
    Option Sets VariableYes, binlog_format
    Variable Namebinlog_format
    Variable ScopeGlobal, Session
    Dynamic VariableYes
     Permitted Values
    Typeenumeration
    DefaultSTATEMENT
    Valid Values

    ROW

    STATEMENT

    MIXED

    Specify whether to use row-based, statement-based, or mixed replication. Statement-based is the default in MySQL 5.5. This is also true for MySQL Cluster NDB 7.2.1 and later. See Section 16.1.2, "Replication Formats".

    Under some conditions, changing this variable at runtime is not possible, or causes replication to fail. See Section 5.2.4.2, "Setting The Binary Log Format", for more information.

    Prior to MySQL 5.5, setting the binary logging format without enabling binary logging prevented the MySQL server from starting. In MySQL 5.5, the server starts in such cases, the binlog_format global system variable is set, and a warning is logged instead of an error. (Bug #42928)

  • --bootstrap

    Command-Line Format--bootstrap
    Option-File Formatbootstrap

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

    This option is unavailable if MySQL was configured with the DISABLE_GRANT_OPTIONS compiler flag. See Section 2.10.4, "MySQL Source-Configuration Options".

  • --character-sets-dir=path

    Command-Line Format--character-sets-dir=path
    Option-File Formatcharacter-sets-dir=path
    Option Sets VariableYes, character_sets_dir
    Variable Namecharacter-sets-dir
    Variable ScopeGlobal
    Dynamic VariableNo
     Permitted Values
    Typedirectory name

    The directory where character sets are installed. See Section 10.5, "Character Set Configuration".

  • --character-set-client-handshake

    Command-Line Format--character-set-client-handshake
    Option-File Formatcharacter-set-client-handshake
     Permitted Values
    Typeboolean
    DefaultTRUE

    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.

  • --character-set-filesystem=charset_name

    Command-Line Format--character-set-filesystem=name
    Option-File Formatcharacter-set-filesystem
    Option Sets VariableYes, character_set_filesystem
    Variable Namecharacter_set_filesystem
    Variable ScopeGlobal, Session
    Dynamic VariableYes
     Permitted Values
    Typestring

    The file system character set. This option sets the character_set_filesystem system variable.

  • --character-set-server=charset_name, -C charset_name

    Command-Line Format--character-set-server
    Option-File Formatcharacter-set-server
    Option Sets VariableYes, character_set_server
    Variable Namecharacter_set_server
    Variable ScopeGlobal, Session
    Dynamic VariableYes
     Permitted Values
    Typestring

    Use charset_name as the default server character set. See Section 10.5, "Character Set Configuration". If you use this option to specify a nondefault character set, you should also use --collation-server to specify the collation.

  • --chroot=path, -r path

    Command-Line Format--chroot=name
    -r name
    Option-File Formatchroot
     Permitted Values
    Typefile name

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

  • --collation-server=collation_name

    Command-Line Format--collation-server
    Option-File Formatcollation-server
    Option Sets VariableYes, collation_server
    Variable Namecollation_server
    Variable ScopeGlobal, Session
    Dynamic VariableYes
     Permitted Values
    Typestring

    Use collation_name as the default server collation. See Section 10.5, "Character Set Configuration".

  • --console

    Command-Line Format--console
    Option-File Formatconsole
    Platform Specificwindows

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

    As of MySQL 5.5.3, passing in both --log-error and --console will write to the log file, but not to the console.

  • --core-file

    Command-Line Format--core-file
    Option-File Formatcore-file
     Permitted Values
    Typeboolean
    DefaultOFF

    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 Mac OS X, 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=path, -h path

    Command-Line Format--datadir=path
    -h
    Option-File Formatdatadir
    Option Sets VariableYes, datadir
    Variable Namedatadir
    Variable ScopeGlobal
    Dynamic VariableNo
     Permitted Values
    Typefile name

    The path to the data directory.

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

    Command-Line Format--debug[=debug_options]
    Option-File Formatdebug
    Variable Namedebug
    Variable ScopeGlobal, Session
    Dynamic VariableYes
     Permitted Values
    Typestring
    Default'd:t:o,/tmp/mysqld.trace'

    If MySQL is configured with -DWITH_DEBUG=1, 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,mysqld.trace'. See MySQL Internals: Porting to Other Systems.

    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.

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

    Command-Line Format--debug-sync-timeout[=#]
    Option-File Formatdebug-sync-timeout
     Permitted Values
    Typenumeric

    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 option (see Section 2.10.4, "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.

  • --default-character-set=charset_name

    Command-Line Format--default-character-set=name
    -C name
    Option-File Formatdefault-character-set=name
    Deprecated5.0
     Permitted Values
    Typestring

    Use charset_name as the default character set. This option is deprecated in favor of --character-set-server. See Section 10.5, "Character Set Configuration". --default-character-set was removed in MySQL 5.5.3.

  • --default-collation=collation_name

    Command-Line Format--default-collation=name
    Option-File Formatdefault-collation=name
    Deprecated4.1.3
     Permitted Values
    Typestring

    Use collation_name as the default collation. This option is deprecated in favor of --collation-server. See Section 10.5, "Character Set Configuration". --default-collation was removed in MySQL 5.5.3.

  • --default-storage-engine=type

    Command-Line Format--default-storage-engine=name
    Option-File Formatdefault-storage-engine
    Option Sets VariableYes, default_storage_engine
    Variable Namedefault_storage_engine
    Variable ScopeGlobal, Session
    Dynamic VariableYes
     Permitted Values (<= 5.5.4)
    Typeenumeration
    DefaultMyISAM
     Permitted Values (>= 5.5.5)
    Typeenumeration
    DefaultInnoDB

    Set the default storage engine (table type) for tables. See Chapter 14, Storage Engines.

    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.

  • --default-time-zone=timezone

    Command-Line Format--default-time-zone=name
    Option-File Formatdefault-time-zone
     Permitted Values
    Typestring

    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.

  • --delay-key-write[={OFF|ON|ALL}]

    Command-Line Format--delay-key-write[=name]
    Option-File Formatdelay-key-write
    Option Sets VariableYes, delay_key_write
    Variable Namedelay-key-write
    Variable ScopeGlobal
    Dynamic VariableYes
     Permitted Values
    Typeenumeration
    DefaultON
    Valid Values

    ON

    OFF

    ALL

    Specify how to use delayed key writes. Delayed key writing causes key buffers not to be flushed between writes for MyISAM tables. OFF disables delayed key writes. ON enables delayed key writes for those tables that were created with the DELAY_KEY_WRITE option. ALL delays key writes for all MyISAM tables. See Section 8.11.2, "Tuning Server Parameters", and Section 14.5.1, "MyISAM Startup Options".

    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.

  • --des-key-file=file_name

    Command-Line Format--des-key-file=file_name
    Option-File Formatdes-key-file=file_name

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

  • --enable-locking

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

  • --enable-named-pipe

    Command-Line Format--enable-named-pipe
    Option-File Formatenable-named-pipe
    Option Sets VariableYes, named_pipe
    Platform Specificwindows

    Enable support for named pipes. This option applies only on Windows.

  • --enable-pstack

    Version Removed5.5.7
    Command-Line Format--enable-pstack
    Option-File Formatenable-pstack
    Deprecated5.1.54
     Permitted Values
    Typeboolean
    DefaultFALSE

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

  • --engine-condition-pushdown={ON|OFF}

    Version Deprecated5.5.3
    Command-Line Format--engine-condition-pushdown
    Option-File Formatengine-condition-pushdown
    Option Sets VariableYes, engine_condition_pushdown
    Variable Nameengine_condition_pushdown
    Variable ScopeGlobal, Session
    Dynamic VariableYes
    Deprecated5.5.3, by optimizer_switch
     Permitted Values
    Typeboolean
    DefaultON

    Sets the engine_condition_pushdown system variable. For more information, see Section 8.13.3, "Engine Condition Pushdown Optimization".

  • --event-scheduler[=value]

    Command-Line Format--event-scheduler[=value]
    Option-File Formatevent-scheduler
    Option Sets VariableYes, event_scheduler
    Variable Nameevent_scheduler
    Variable ScopeGlobal
    Dynamic VariableYes
     Permitted Values
    Typeenumeration
    DefaultOFF
    Valid Values

    ON

    OFF

    DISABLED

    Enable or disable, and start or stop, the event scheduler.

    For detailed information, see The --event-scheduler Option.

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

    Command-Line Format--exit-info[=flags]
    -T [flags]
    Option-File Formatexit-info
     Permitted Values
    Typenumeric

    This is a bit mask 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

    Command-Line Format--external-locking
    Option-File Formatexternal-locking
    Option Sets VariableYes, skip_external_locking
    Disabled byskip-external-locking
     Permitted Values
    Typeboolean
    DefaultFALSE

    Enable external locking (system locking), which is disabled by default as of MySQL 4.0. Note that 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.

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

  • --flush

    Command-Line Format--flush
    Option-File Formatflush
    Variable Nameflush
    Variable ScopeGlobal
    Dynamic VariableYes
     Permitted Values
    Typeboolean
    DefaultOFF

    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 C.5.4.2, "What to Do If MySQL Keeps Crashing".

  • --gdb

    Command-Line Format--gdb
    Option-File Formatgdb
     Permitted Values
    Typeboolean
    DefaultFALSE

    Install an interrupt handler for SIGINT (needed to stop mysqld with ^C to set breakpoints) and disable stack tracing and core file handling. See MySQL Internals: Porting to Other Systems.

  • --general-log[={0|1}]

    Command-Line Format--general-log
    Option-File Formatgeneral-log
    Option Sets VariableYes, general_log
    Variable Namegeneral_log
    Variable ScopeGlobal
    Dynamic VariableYes
     Permitted Values
    Typeboolean
    DefaultOFF

    Specify the initial general query log state. With no argument or an argument of 1, the --general-log option enables the log. If omitted or given with an argument of 0, the option disables the log.

  • --init-file=file_name

    Command-Line Format--init-file=file_name
    Option-File Formatinit-file=file_name
    Option Sets VariableYes, init_file
    Variable Nameinit_file
    Variable ScopeGlobal
    Dynamic VariableNo
     Permitted Values
    Typefile name

    Read SQL statements from this file at startup. Each statement must be on a single line and should not include comments.

    This option is unavailable if MySQL was configured with the DISABLE_GRANT_OPTIONS compiler flag. See Section 2.10.4, "MySQL Source-Configuration Options".

  • --innodb-xxx

    The InnoDB options are listed in Section 14.3.4, "InnoDB Startup Options and System Variables".

  • --install [service_name]

    Command-Line Format--install [service_name]

    (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.7.7, "Starting MySQL as a Windows Service".

  • --install-manual [service_name]

    Command-Line Format--install-manual [service_name]

    (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.7.7, "Starting MySQL as a Windows Service".

  • --language=lang_name, -L lang_name

    Command-Line Format--language=name
    -L
    Option-File Formatlanguage
    Option Sets VariableYes, language
    Variable Namelanguage
    Variable ScopeGlobal
    Dynamic VariableNo
    Deprecated5.6.1
     Permitted Values
    Typedirectory name
    Default/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.2, "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

    Command-Line Format--large-pages
    Option-File Formatlarge-pages
    Option Sets VariableYes, large_pages
    Variable Namelarge_pages
    Variable ScopeGlobal
    Dynamic VariableNo
    Platform Specificlinux
     Permitted Values
    Type (linux)boolean
    DefaultFALSE

    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 5.5 supports the Linux implementation of large page support (which is called HugeTLB in Linux). See Section 8.11.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

    Command-Line Format--lc-messages=name
    Option-File Formatlc-messages
    Option Sets VariableYes, lc_messages
    Variable Namelc-messages
    Variable ScopeGlobal, Session
    Dynamic VariableYes
     Permitted Values
    Typestring

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

  • --lc-messages-dir=path

    Command-Line Format--lc-messages-dir=path
    Option-File Formatlc-messages-dir
    Option Sets VariableYes, lc_messages_dir
    Variable Namelc-messages-dir
    Variable ScopeGlobal
    Dynamic VariableNo
     Permitted Values
    Typedirectory name

    The directory where error messages are located. The value is used together with the value of --lc-messages to produce the location for the error message file. See Section 10.2, "Setting the Error Message Language".

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

    Command-Line Format--log[=name]
    -l
    Option-File Formatlog
    Option Sets VariableYes, log
    Variable Namelog
    Variable ScopeGlobal
    Dynamic VariableYes
    Deprecated5.1.29, by general-log
     Permitted Values
    Typestring
    DefaultOFF

    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 option. If you omit the file name, MySQL uses host_name.log as the file name. See Section 5.2.1, "Selecting General Query and Slow Query Log Output Destinations", and Section 5.2.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 option to enable the general query log and the --general_log_file=file_name option to set the general query log file name.

  • --log-error[=file_name]

    Command-Line Format--log-error[=name]
    Option-File Formatlog-error
    Option Sets VariableYes, log_error
    Variable Namelog_error
    Variable ScopeGlobal
    Dynamic VariableNo
     Permitted Values
    Typefile name

    Log errors and startup messages to this file. See Section 5.2.2, "The Error Log". If you omit the file name, MySQL uses host_name.err. If the file name has no extension, the server adds an extension of .err.

  • --log-isam[=file_name]

    Command-Line Format--log-isam[=name]
    Option-File Formatlog-isam
     Permitted Values
    Typefile name

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

  • --log-long-format

    Command-Line Format--log-long-format
    -0
    Option-File Formatlog-long-format
    Deprecated4.1

    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 option is available 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-output=value,...

    Command-Line Format--log-output=name
    Option-File Formatlog-output
    Option Sets VariableYes, log_output
    Variable Namelog_output
    Variable ScopeGlobal
    Dynamic VariableYes
     Permitted Values
    Typeset
    DefaultFILE
    Valid Values

    TABLE

    FILE

    NONE

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

    This option selects log output destinations, but does not enable log output. To do that, use the --general_log and --slow_query_log options. For FILE logging, the --general_log_file and -slow_query_log_file options determine the log file location. For more information, see Section 5.2.1, "Selecting General Query and Slow Query Log Output Destinations".

  • --log-queries-not-using-indexes

    Command-Line Format--log-queries-not-using-indexes
    Option-File Formatlog-queries-not-using-indexes
    Option Sets VariableYes, log_queries_not_using_indexes
    Variable Namelog_queries_not_using_indexes
    Variable ScopeGlobal
    Dynamic VariableYes
     Permitted Values
    Typeboolean
    DefaultOFF

    If you are using this option with the slow query log enabled, queries that are expected to retrieve all rows are logged. See Section 5.2.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-short-format

    Command-Line Format--log-short-format
    Option-File Formatlog-short-format
     Permitted Values
    Typeboolean
    DefaultFALSE

    Log less information to the binary log and slow query log, if they have been activated.

  • --log-slow-admin-statements

    Command-Line Format--log-slow-admin-statements
    Option-File Formatlog-slow-admin-statements
     Permitted Values
    Typeboolean
    DefaultFALSE

    Log slow administrative statements such as OPTIMIZE TABLE, ANALYZE TABLE, and ALTER TABLE to the slow query log.

  • --log-slow-queries[=file_name]

    Command-Line Format--log-slow-queries[=name]
    Option-File Formatlog-slow-queries
    Option Sets VariableYes, log_slow_queries
    Variable Namelog_slow_queries
    Variable ScopeGlobal
    Dynamic VariableYes
    Deprecated5.1.29, by slow-query-log
     Permitted Values
    Typeboolean

    This option enables logging 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 option. If you omit the file name, MySQL uses host_name-slow.log as the file name. See Section 5.2.1, "Selecting General Query and Slow Query Log Output Destinations", and Section 5.2.5, "The Slow Query Log".

    The --log-slow-queries option is deprecated and is removed (along with the log_slow_queries system variable) in MySQL 5.6. Instead, use the --slow_query_log option to enable the slow query log and the --slow_query_log_file=file_name option to set the slow query log file name.

  • --log-tc=file_name

    Command-Line Format--log-tc=name
    Option-File Formatlog-tc
     Permitted Values
    Typefile name
    Defaulttc.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. Currently, this option is unused.

  • --log-tc-size=size

    Command-Line Format--log-tc-size=#
    Option-File Formatlog-tc-size
     Permitted Values
    Platform Bit Size32
    Typenumeric
    Default24576
    Max Value4294967295
     Permitted Values
    Platform Bit Size64
    Typenumeric
    Default24576
    Max Value18446744073709547520

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

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

    Command-Line Format--log-warnings[=#]
    -W [#]
    Option-File Formatlog-warnings
    Option Sets VariableYes, log_warnings
    Variable Namelog_warnings
    Variable ScopeGlobal, Session
    Dynamic VariableYes
    Disabled byskip-log-warnings
     Permitted Values
    Platform Bit Size64
    Typenumeric
    Default1
    Range0 .. 18446744073709547520

    Print out warnings such as Aborted connection... to the error log. Enabling this option is recommended, for example, if you use replication (you get more information about what is happening, such as messages about network failures and reconnections). This option is enabled (1) by default, and the default level value if omitted is 1. To disable this option, use --log-warnings=0. 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 C.5.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 only if --log-warnings is enabled.

  • --low-priority-updates

    Command-Line Format--low-priority-updates
    Option-File Formatlow-priority-updates
    Option Sets VariableYes, low_priority_updates
    Variable Namelow_priority_updates
    Variable ScopeGlobal, Session
    Dynamic VariableYes
     Permitted Values
    Typeboolean
    DefaultFALSE

    Give table-modifying operations (INSERT, REPLACE, DELETE, UPDATE) lower priority than selects. This can also be done using {INSERT | REPLACE | DELETE | UPDATE} LOW_PRIORITY ... to lower the priority of only one query, or by SET LOW_PRIORITY_UPDATES=1 to change the priority in one thread. This affects only storage engines that use only table-level locking (MyISAM, MEMORY, MERGE). See Section 8.10.2, "Table Locking Issues".

  • --min-examined-row-limit=number

    Command-Line Format--min-examined-row-limit=#
    Option-File Formatmin-examined-row-limit
    Variable Namemin_examined_row_limit
    Variable ScopeGlobal, Session
    Dynamic VariableYes
     Permitted Values
    Platform Bit Size32
    Typenumeric
    Default0
    Range0 .. 4294967295
     Permitted Values
    Platform Bit Size64
    Typenumeric
    Default0
    Range0 .. 18446744073709547520

    When this option is set, queries which examine fewer than number rows are not written to the slow query log. The default is 0.

  • --memlock

    Command-Line Format--memlock
    Option-File Formatmemlock
    Variable Namelocked_in_memory
    Variable ScopeGlobal
    Dynamic VariableNo
     Permitted Values
    Typeboolean
    DefaultFALSE

    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 newer 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.11.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

    Command-Line Format--myisam-block-size=#
    Option-File Formatmyisam-block-size
     Permitted Values
    Typenumeric
    Default1024
    Range1024 .. 16384

    The block size to be used for MyISAM index pages.

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

    This option is renamed as of MySQL 5.5.3 to --myisam-recover-options. See the description of that option for more information.

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

    Version Introduced5.5.3
    Command-Line Format--myisam-recover-options[=name]
    Option-File Formatmyisam-recover-options
    Option Sets VariableYes, myisam_recover_options
     Permitted Values
    Typeenumeration
    DefaultOFF
    Valid Values

    OFF

    DEFAULT

    BACKUP

    FORCE

    QUICK

    Set the MyISAM storage engine recovery mode. The option 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 option with no argument 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.

    OptionDescription
    OFFNo recovery.
    DEFAULTRecovery without backup, forcing, or quick checking.
    BACKUPIf the data file was changed during recovery, save a backup of the tbl_name.MYD file as tbl_name-datetime.BAK.
    FORCERun recovery even if we would lose more than one row from the.MYD file.
    QUICKDo 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 option was named --myisam-recover, 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.3, "Specifying Program Options".)

    The option value OFF is available as of MySQL 5.5.3.

    See Section 14.5.1, "MyISAM Startup Options".

  • --old-alter-table

    Command-Line Format--old-alter-table
    Option-File Formatold-alter-table
    Option Sets VariableYes, old_alter_table
    Variable Nameold_alter_table
    Variable ScopeGlobal, Session
    Dynamic VariableYes
     Permitted Values
    Typeboolean
    DefaultOFF

    When this option is given, 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 Syntax".

  • --old-style-user-limits

    Command-Line Format--old-style-user-limits
    Option-File Formatold-style-user-limits
     Permitted Values
    Typeboolean
    DefaultFALSE

    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.3.4, "Setting Account Resource Limits".

  • --one-thread

    Command-Line Format--one-thread
    Option-File Formatone-thread

    Only use one thread (for debugging under Linux). This option is available only if the server is built with debugging enabled. See MySQL Internals: Porting to Other Systems.

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

  • --open-files-limit=count

    Command-Line Format--open-files-limit=#
    Option-File Formatopen-files-limit
    Option Sets VariableYes, open_files_limit
    Variable Nameopen_files_limit
    Variable ScopeGlobal
    Dynamic VariableNo

    Changes the number of file descriptors available to mysqld. You should try increasing the value of this option if mysqld gives you the error Too many open files. mysqld uses the option value to reserve descriptors with setrlimit(). 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.

  • --partition[=value]

    Command-Line Format--partition
    Option-File Formatpartition
    Option Sets VariableYes, have_partitioning
    Variable Namepartition
    Variable ScopeGlobal
    Dynamic VariableNo
    Disabled byskip-partition
     Permitted Values
    Typeboolean
    DefaultON

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

  • --pid-file=path

    Command-Line Format--pid-file=file_name
    Option-File Formatpid-file=file_name
    Option Sets VariableYes, pid_file
    Variable Namepid_file
    Variable ScopeGlobal
    Dynamic VariableNo
     Permitted Values
    Typefile name

    The path name of the process ID file. 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.

  • --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.3.2, "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.

  • --plugin-load=plugin_list

    Command-Line Format--plugin-load=plugin_list
    Option-File Formatplugin-load=plugin_list
     Permitted Values
    Typestring

    This option tells the server to load the named plugins at startup. The option value is a semicolon-separated list of name=plugin_library pairs. Each name is the name of the plugin, and plugin_library is the name of the shared library that contains the plugin code. Each library file must be located 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 load them at startup:

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

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

    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.

    If a plugin library is named without any preceding plugin name, the server loads all plugins in the library.

    Each 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.1.8.1, "Installing and Uninstalling Plugins".

  • --port=port_num, -P port_num

    Command-Line Format--port=#
    -P
    Option-File Formatport
    Option Sets VariableYes, port
    Variable Nameport
    Variable ScopeGlobal
    Dynamic VariableNo
     Permitted Values
    Typenumeric
    Default3306

    The port number to use when listening for TCP/IP connections. The port number must be 1024 or higher unless the server is started by the root system user.

  • --port-open-timeout=num

    Command-Line Format--port-open-timeout=#
    Option-File Formatport-open-timeout
     Permitted Values
    Typenumeric
    Default0

    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.

  • --remove [service_name]

    Command-Line Format--remove [service_name]

    (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.7.7, "Starting MySQL as a Windows Service".

  • --safe-mode

    Version Deprecated5.5.26
    Command-Line Format--safe-mode
    Option-File Formatsafe-mode
    Deprecated5.5.26

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

  • --safe-show-database

    Version Removed5.5.3
    Command-Line Format--safe-show-database(until 4.1.1) 
    Option-File Formatsafe-show-database
    Variable Namesafe_show_database
    Variable ScopeGlobal
    Dynamic VariableYes
    Deprecated4.0.2
     Permitted Values
    Typeboolean

    This option is deprecated and does not do anything because 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.1, "Privileges Provided by MySQL". --safe-show-database was removed in MySQL 5.5.3.

  • --safe-user-create

    Command-Line Format--safe-user-create
    Option-File Formatsafe-user-create
     Permitted Values
    Typeboolean
    DefaultFALSE

    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 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.

  • --secure-auth

    Command-Line Format--secure-auth
    Option-File Formatsecure-auth
    Option Sets VariableYes, secure_auth
    Variable Namesecure_auth
    Variable ScopeGlobal
    Dynamic VariableYes

    This option causes the server to block connections by clients that attempt to use accounts that have passwords stored in the old (pre-4.1) format. Use it 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 option is enabled and the privilege tables are in pre-4.1 format. See Section C.5.2.4, "Client does not support authentication protocol".

    The mysql client also has a --secure-auth option, which prevents connections to a server if the server requires a password in old format for the client account.

  • --secure-file-priv=path

    Command-Line Format--secure-file-priv=path
    Option-File Formatsecure-file-priv=path
    Option Sets VariableYes, secure_file_priv
    Variable Namesecure-file-priv
    Variable ScopeGlobal
    Dynamic VariableNo
     Permitted Values
    Typestring

    This option limits the effect of the LOAD_FILE() function and the LOAD DATA and SELECT ... INTO OUTFILE statements to work only with files in the specified directory.

  • --shared-memory

    Enable shared-memory connections by local clients. This option is available only on Windows.

  • --shared-memory-base-name=name

    The name of shared memory to use for shared-memory connections. This option is available only on Windows. The default name is MYSQL. The name is case sensitive.

  • --skip-concurrent-insert

    Turn off the ability to select and insert at the same time on MyISAM tables. (This is to be used only if you think you have found a bug in this feature.) See Section 8.10.3, "Concurrent Inserts".

  • --skip-external-locking

    Do not use external locking (system locking). This affects only MyISAM table access. For more information, including conditions under which it can and cannot be used, see Section 8.10.5, "External Locking".

    External locking has been disabled by default since MySQL 4.0.

  • --skip-event-scheduler

    Command-Line Format--skip-event-scheduler
    --disable-event-scheduler
    Option-File Formatskip-event-scheduler

    Turns the Event Scheduler OFF. This is not the same as disabling the Event Scheduler, which requires setting --event-scheduler=DISABLED; see The --event-scheduler Option, for more information.

  • --skip-grant-tables

    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 suppresses loading of plugins that were installed with the INSTALL PLUGIN statement, user-defined functions (UDFs), and scheduled events. To cause plugins to be loaded anyway, use the --plugin-load option.

    --skip-grant-tables is unavailable if MySQL was configured with the DISABLE_GRANT_OPTIONS compiler flag. See Section 2.10.4, "MySQL Source-Configuration Options".

  • --skip-host-cache

    Disable use of the internal host cache for faster name-to-IP resolution. In this case, the server performs a DNS lookup every time a client connects. See Section 8.11.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 use --default-storage-engine to set the default to some other engine.

  • --skip-name-resolve

    Do not resolve host names when checking client connections. Use only IP addresses. If you use this option, all Host column values in the grant tables must be IP addresses or localhost. See Section 8.11.5.2, "DNS Lookup Optimization and the Host Cache".

  • --skip-networking

    Do not listen for TCP/IP connections at all. 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.11.5.2, "DNS Lookup Optimization and the Host Cache".

  • --skip-partition

    Command-Line Format--skip-partition
    --disable-partition
    Option-File Formatskip-partition

    Disables user-defined partitioning. Existing partitioned tables cannot be accessed when the server has been started with this option.

  • --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 Section 6.3.8.4, "SSL Command Options".

  • --standalone

    Command-Line Format--standalone
    Option-File Formatstandalone
    Platform Specificwindows

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

  • --super-large-pages

    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

    Command-Line Format--symbolic-links
    Option-File Formatsymbolic-links

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

  • --skip-safemalloc

    Version Removed5.5.6
    Command-Line Format--skip-safemalloc
    Option-File Formatskip-safemalloc

    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

    Command-Line Format--skip-show-database
    Option-File Formatskip-show-database
    Option Sets VariableYes, skip_show_database
    Variable Nameskip_show_database
    Variable ScopeGlobal
    Dynamic VariableNo

    With this option, the SHOW DATABASES statement is permitted only to users who have the SHOW DATABASES privilege, and the statement displays all database names. Without this option, SHOW DATABASES is permitted to all users, but displays each database name only if the user has the SHOW DATABASES privilege or some privilege for the database. Note that any global privilege is considered a privilege for the database.

  • --skip-stack-trace

    Command-Line Format--skip-stack-trace
    Option-File Formatskip-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 MySQL Internals: Porting to Other Systems.

  • --skip-thread-priority

    Command-Line Format--skip-thread-priority
    Option-File Formatskip-thread-priority
    Deprecated5.1.29

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

  • --slow-query-log[={0|1}]

    Command-Line Format--slow-query-log
    Option-File Formatslow-query-log
    Option Sets VariableYes, slow_query_log
    Variable Nameslow_query_log
    Variable ScopeGlobal
    Dynamic VariableYes
     Permitted Values
    Typeboolean
    DefaultOFF

    Specify the initial slow query log state. With no argument or an argument of 1, the --slow-query-log option enables the log. If omitted or given with an argument of 0, the option disables the log.

  • --slow-start-timeout=timeout

    Version Introduced5.5.20
    Command-Line Format--slow-start-timeout=#
    Option-File Formatslow-start-timeout=#
     Permitted Values
    Type (windows)numeric
    Default15000

    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

    Command-Line Format--socket=name
    Option-File Formatsocket
    Option Sets VariableYes, socket
    Variable Namesocket
    Variable ScopeGlobal
    Dynamic VariableNo
     Permitted Values
    Typefile name
    Default/tmp/mysql.sock

    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...]]

    Command-Line Format--sql-mode=name
    Option-File Formatsql-mode
    Option Sets VariableYes, sql_mode
    Variable Namesql_mode
    Variable ScopeGlobal, Session
    Dynamic VariableYes

    Set the SQL mode. See Section 5.1.7, "Server SQL Modes".

  • --sysdate-is-now

    Command-Line Format--sysdate-is-now
    Option-File Formatsysdate-is-now
     Permitted Values
    Typeboolean
    DefaultFALSE

    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.4, "Server System Variables".

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

    Command-Line Format--tc-heuristic-recover=name
    Option-File Formattc-heuristic-recover
     Permitted Values
    Typeenumeration
    Valid Values

    COMMIT

    RECOVER

    The type of decision to use in the heuristic recovery process. Currently, this option is unused.

  • --temp-pool

    Command-Line Format--temp-pool
    Option-File Formattemp-pool
     Permitted Values
    Typeboolean
    DefaultTRUE

    This option 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. This option is ignored except on Linux.

  • --transaction-isolation=level

    Command-Line Format--transaction-isolation=name
    Option-File Formattransaction-isolation
    Option Sets VariableYes, tx_isolation
     Permitted Values
    Typeenumeration
    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 Syntax".

    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=path, -t path

    Command-Line Format--tmpdir=path
    -t
    Option-File Formattmpdir
    Option Sets VariableYes, tmpdir
    Variable Nametmpdir
    Variable ScopeGlobal
    Dynamic VariableNo
     Permitted Values
    Typefile 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 C.5.4.4, "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 INFILE 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}

    Command-Line Format--user=name
    -u name
    Option-File Formatuser
     Permitted Values
    Typestring

    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.

You can assign a value to a server system variable by using 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.

Note that 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.

If you want to restrict the maximum value to which a variable can be set at runtime with SET, you can define this by using the --maximum-var_name=value command-line option.

You can change the values of most system variables for a running server with the SET statement. See Section 13.7.4, "SET Syntax".

Section 5.1.4, "Server System Variables", provides a full description for all variables, and additional information for setting them at server startup and runtime. Section 8.11.2, "Tuning Server Parameters", includes information on optimizing the server by tuning system variables.

Copyright © 1997, 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices
(Sebelumnya) 4.6. MySQL Administrative and ...5.1.4. Server System Variables (Berikutnya)