载入中
自定义HTML载入中... loading
mysqld — The MySQL Server [转贴 2008-03-05 16:40:52]  删除... 
字体变小 字体变大

5.2. mysqld — The MySQL Server

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

  • Startup options that the server supports

  • Server system variables

  • Server status variables

  • How to set the server SQL mode

  • The server shutdown process

Note

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

5.2.1. 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 (Server 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.

Note

This table is part of an ongoing process to expand and simplify the information provided on these elements. Further improvements to the table, and corresponding descriptions will be applied over the coming months.

Name Cmd-line Option file System Var Status Var Var Scope Dynamic
abort-slave-event-count Y Y        
Aborted_clients       Y both no
Aborted_connects       Y both no
allow-suspicious-udfs Y Y        
ansi Y Y        
auto-increment-increment Y Y     both no
- Variable: auto_increment_increment     Y   both no
auto-increment-offset Y Y     both no
- Variable: auto_increment_offset     Y   both no
autocommit Y Y Y   session yes
automatic_sp_privileges Y Y Y   both no
back_log Y Y Y   both no
basedir Y Y Y   global no
bdb-home Y Y     global no
- Variable: bdb_home     Y   global no
bdb-lock-detect Y Y Y   global no
bdb-logdir Y Y     global no
- Variable: bdb_logdir     Y   global no
bdb-no-recover Y Y        
bdb-shared-data Y Y     global no
- Variable: bdb_shared_data     Y   global no
bdb-tmpdir Y Y     global no
- Variable: bdb_tmpdir     Y   global no
bdb_cache_size Y Y Y   both no
bdb_log_buffer_size Y Y Y   global no
bdb_max_lock Y Y Y   global no
big-tables Y Y     global yes
- Variable: big_tables     Y   global yes
bind-address Y Y        
binlog-do-db Y Y        
binlog-ignore-db Y Y        
Binlog_cache_disk_use       Y both no
binlog_cache_size Y Y Y   global yes
Binlog_cache_use       Y both no
bootstrap Y Y        
bulk_insert_buffer_size Y Y Y   both yes
Bytes_received       Y both no
Bytes_sent       Y both no
character-set-client-handshake Y          
character-set-filesystem Y Y     both yes
- Variable: character_set_filesystem     Y   both yes
character-set-server Y Y     both yes
- Variable: character_set_server     Y   both yes
character-sets-dir Y Y     global no
- Variable: character_sets_dir     Y   global no
character_set_client     Y   both yes
character_set_connection     Y   both yes
character_set_database     Y   both yes
character_set_results     Y   both yes
character_set_system     Y   global yes
chroot Y Y        
collation_connection Y Y Y   both yes
collation_database Y Y Y   both yes
collation_server Y Y Y   both yes
Com_admin_commands       Y both no
Com_alter_db       Y both no
Com_alter_event       Y both no
Com_alter_table       Y both no
Com_analyze       Y both no
Com_backup_table       Y both no
Com_begin       Y both no
Com_call_procedure       Y both no
Com_change_db       Y both no
Com_change_master       Y both no
Com_check       Y both no
Com_checksum       Y both no
Com_commit       Y both no
Com_create_db       Y both no
Com_create_event       Y both no
Com_create_function       Y both no
Com_create_index       Y both no
Com_create_table       Y both no
Com_create_user       Y both no
Com_dealloc_sql       Y both no
Com_delete       Y both no
Com_delete_multi       Y both no
Com_do       Y both no
Com_drop_db       Y both no
Com_drop_event       Y both no
Com_drop_function       Y both no
Com_drop_index       Y both no
Com_drop_table       Y both no
Com_drop_user       Y both no
Com_execute_sql       Y both no
Com_flush       Y both no
Com_grant       Y both no
Com_ha_close       Y both no
Com_ha_open       Y both no
Com_ha_read       Y both no
Com_help       Y both no
Com_insert       Y both no
Com_insert_select       Y both no
Com_kill       Y both no
Com_load       Y both no
Com_lock_tables       Y both no
Com_optimize       Y both no
Com_preload_keys       Y both no
Com_prepare_sql       Y both no
Com_purge       Y both no
Com_purge_before_date       Y both no
Com_rename_table       Y both no
Com_repair       Y both no
Com_replace       Y both no
Com_replace_select       Y both no
Com_reset       Y both no
Com_restore_table       Y both no
Com_revoke       Y both no
Com_revoke_all       Y both no
Com_rollback       Y both no
Com_savepoint       Y both no
Com_select       Y both no
Com_set_option       Y both no
Com_show_binlog_events       Y both no
Com_show_binlogs       Y both no
Com_show_charsets       Y both no
Com_show_collations       Y both no
Com_show_column_types       Y both no
Com_show_create_db       Y both no
Com_show_create_event       Y both no
Com_show_create_table       Y both no
Com_show_databases       Y both no
Com_show_engine_logs       Y both no
Com_show_engine_mutex       Y both no
Com_show_engine_status       Y both no
Com_show_errors       Y both no
Com_show_events       Y both no
Com_show_fields       Y both no
Com_show_grants       Y both no
Com_show_innodb_status       Y both no
Com_show_keys       Y both no
Com_show_logs       Y both no
Com_show_master_status       Y both no
Com_show_ndb_status       Y both no
Com_show_new_master       Y both no
Com_show_open_tables       Y both no
Com_show_plugins       Y both no
Com_show_privileges       Y both no
Com_show_processlist       Y both no
Com_show_slave_hosts       Y both no
Com_show_slave_status       Y both no
Com_show_status       Y both no
Com_show_storage_engines       Y both no
Com_show_tables       Y both no
Com_show_triggers       Y both no
Com_show_variables       Y both no
Com_show_warnings       Y both no
Com_slave_start       Y both no
Com_slave_stop       Y both no
Com_stmt_close       Y both no
Com_stmt_execute       Y both no
Com_stmt_fetch       Y both no
Com_stmt_prepare       Y both no
Com_stmt_reset       Y both no
Com_stmt_send_long_data       Y both no
Com_truncate       Y both no
Com_unlock_tables       Y both no
Com_update       Y both no
Com_update_multi       Y both no
Com_xa_commit       Y both no
Com_xa_end       Y both no
Com_xa_prepare       Y both no
Com_xa_recover       Y both no
Com_xa_rollback       Y both no
Com_xa_start       Y both no
completion_type Y Y Y   both yes
Compression       Y both no
concurrent-insert Y Y     global yes
- Variable: concurrent_insert     Y   global yes
connect_timeout Y Y Y   global yes
Connections       Y both no
console Y Y        
core-file Y Y        
Created_tmp_disk_tables       Y both no
Created_tmp_files       Y both no
Created_tmp_tables       Y both no
datadir Y Y Y   global no
date_format Y Y Y   both yes
datetime_format Y Y Y   both yes
debug Y Y        
default-character-set Y Y        
default-storage-engine Y Y        
default-table-type Y Y        
default-time-zone Y Y        
default_week_format Y Y Y   both yes
defaults-extra-file Y          
defaults-file Y          
defaults-group-suffix Y          
delay-key-write Y Y     global yes
- Variable: delay_key_write     Y   global yes
Delayed_errors       Y both no
delayed_insert_limit Y Y Y   global yes
Delayed_insert_threads       Y both no
delayed_insert_timeout Y Y Y   global yes
delayed_queue_size Y Y Y   global yes
Delayed_writes       Y both no
des-key-file Y Y Y   global no
disconnect-slave-event-count Y Y        
div_precision_increment Y Y Y   both yes
enable-locking Y          
enable-pstack Y Y        
engine-condition-pushdown Y Y     both yes
- Variable: engine_condition_pushdown     Y   both yes
error_count     Y   session no
exit-info Y Y        
expire_logs_days Y Y Y   global yes
external-locking Y Y        
flush Y Y Y   both yes
Flush_commands       Y both no
flush_time Y Y Y   global yes
foreign_key_checks Y   Y   session yes
ft_boolean_syntax Y Y Y   global yes
ft_max_word_len Y Y Y   both yes
ft_min_word_len Y Y Y   global yes
ft_query_expansion_limit Y Y Y   both yes
ft_stopword_file Y Y Y   both yes
gdb Y Y        
group_concat_max_len Y Y Y   both yes
Handler_commit       Y both no
Handler_delete       Y both no
Handler_discover       Y both no
Handler_prepare       Y both no
Handler_read_first       Y both no
Handler_read_key       Y both no
Handler_read_next       Y both no
Handler_read_prev       Y both no
Handler_read_rnd       Y both no
Handler_read_rnd_next       Y both no
Handler_rollback       Y both no
Handler_savepoint       Y both no
Handler_savepoint_rollback       Y both no
Handler_update       Y both no
Handler_write       Y both no
have_archive     Y   global no
have_bdb     Y   global no
have_blackhole_engine     Y   global no
have_compress     Y   global no
have_crypt     Y   global no
have_csv     Y   global no
have_example_engine     Y   global no
have_federated_engine     Y   global no
have_geometry     Y   global no
have_innodb     Y   global no
have_isam     Y   global no
have_merge_engine     Y   global no
have_ndbcluster     Y   global no
have_openssl     Y   global no
have_query_cache     Y   global no
have_raid     Y   global no
have_rtree_keys     Y   global no
have_symlink     Y   global no
help Y          
hostname     Y   global no
identity Y Y Y   session yes
init-file Y Y     global no
- Variable: init_file     Y   global no
init_connect Y Y Y   global no
init_slave Y Y Y   global no
innodb Y Y        
innodb-safe-binlog Y Y        
innodb_additional_mem_pool_size Y Y Y   global no
innodb_autoextend_increment Y Y Y   global yes
innodb_buffer_pool_awe_mem_mb Y Y Y   global no
Innodb_buffer_pool_pages_data       Y both no
Innodb_buffer_pool_pages_dirty       Y both no
Innodb_buffer_pool_pages_flushed       Y both no
Innodb_buffer_pool_pages_free       Y both no
Innodb_buffer_pool_pages_latched       Y both no
Innodb_buffer_pool_pages_misc       Y both no
Innodb_buffer_pool_pages_total       Y both no
Innodb_buffer_pool_read_ahead_rnd       Y both no
Innodb_buffer_pool_read_ahead_seq       Y both no
Innodb_buffer_pool_read_requests       Y both no
Innodb_buffer_pool_reads       Y both no
innodb_buffer_pool_size Y Y Y   global no
Innodb_buffer_pool_wait_free       Y both no
Innodb_buffer_pool_write_requests       Y both no
innodb_checksums Y Y Y   global yes
innodb_commit_concurrency Y Y Y   global yes
innodb_concurrency_tickets Y Y Y   global yes
innodb_data_file_path Y Y Y   global no
Innodb_data_fsyncs       Y both no
innodb_data_home_dir Y Y Y   global no
Innodb_data_pending_fsyncs       Y both no
Innodb_data_pending_reads       Y both no
Innodb_data_pending_writes       Y both no
Innodb_data_read       Y both no
Innodb_data_reads       Y both no
Innodb_data_writes       Y both no
Innodb_data_written       Y both no
Innodb_dblwr_pages_written       Y both no
Innodb_dblwr_writes       Y both no
innodb_doublewrite Y Y Y   global no
innodb_fast_shutdown Y Y Y   global no
innodb_file_io_threads Y Y Y   global no
innodb_file_per_table Y Y Y   global no
innodb_flush_log_at_trx_commit Y Y Y   global yes
innodb_flush_method Y Y Y   global no
innodb_force_recovery Y Y Y   global no
innodb_lock_wait_timeout Y Y Y   global no
innodb_locks_unsafe_for_binlog Y Y Y   global no
innodb_log_arch_dir Y Y Y   global no
innodb_log_archive Y Y Y   global no
innodb_log_buffer_size Y Y Y   global no
innodb_log_file_size Y Y Y   global no
innodb_log_files_in_group Y Y Y   global no
innodb_log_group_home_dir Y Y Y   global no
Innodb_log_waits       Y both no
Innodb_log_write_requests       Y both no
Innodb_log_writes       Y both no
innodb_max_dirty_pages_pct Y Y Y   global yes
innodb_max_purge_lag Y Y Y   global yes
innodb_mirrored_log_groups Y Y Y   global no
innodb_open_files Y Y Y   global no
Innodb_os_log_fsyncs       Y both no
Innodb_os_log_pending_fsyncs       Y both no
Innodb_os_log_pending_writes       Y both no
Innodb_os_log_written       Y both no
Innodb_page_size       Y both no
Innodb_pages_created       Y both no
Innodb_pages_read       Y both no
Innodb_pages_written       Y both no
innodb_rollback_on_timeout Y Y Y   global no
Innodb_row_lock_current_waits       Y both no
Innodb_row_lock_time       Y both no
Innodb_row_lock_time_avg       Y both no
Innodb_row_lock_time_max       Y both no
Innodb_row_lock_waits       Y both no
Innodb_rows_deleted       Y both no
Innodb_rows_inserted       Y both no
Innodb_rows_read       Y both no