Documentation Home
MySQL 8.0 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 43.3Mb
PDF (A4) - 43.4Mb
Man Pages (TGZ) - 297.2Kb
Man Pages (Zip) - 402.4Kb
Info (Gzip) - 4.3Mb
Info (Zip) - 4.3Mb
Excerpts from this Manual

MySQL 8.0 Reference Manual  / The InnoDB Storage Engine  /  InnoDB Startup Options and System Variables

17.14 InnoDB Startup Options and System Variables

  • System variables that are true or false can be enabled at server startup by naming them, or disabled by using a--skip- prefix. For example, to enable or disable theInnoDB adaptive hash index, you can use--innodb-adaptive-hash-index or--skip-innodb-adaptive-hash-index on the command line, orinnodb_adaptive_hash_index orskip_innodb_adaptive_hash_index in an option file.

  • Some variable descriptions refer toenabling ordisabling a variable. These variables can be enabled with theSET statement by setting them toON or1, or disabled by setting them toOFF or0. Boolean variables can be set at startup to the valuesON,TRUE,OFF, andFALSE (not case-sensitive), as well as1 and0. SeeSection 6.2.2.4, “Program Option Modifiers”.

  • System variables that take a numeric value can be specified as--var_name=value on the command line or asvar_name=value in option files.

  • Many system variables can be changed at runtime (seeSection 7.1.9.2, “Dynamic System Variables”).

  • For information aboutGLOBAL andSESSION variable scope modifiers, refer to theSET statement documentation.

  • Certain options control the locations and layout of theInnoDB data files.Section 17.8.1, “InnoDB Startup Configuration” explains how to use these options.

  • Some options, which you might not use initially, help tuneInnoDB performance characteristics based on machine capacity and your databaseworkload.

  • For more information on specifying options and system variables, seeSection 6.2.2, “Specifying Program Options”.

Table 17.24 InnoDB Option and Variable Reference

NameCmd-LineOption FileSystem VarStatus VarVar ScopeDynamic
daemon_memcached_enable_binlogYesYesYesGlobalNo
daemon_memcached_engine_lib_nameYesYesYesGlobalNo
daemon_memcached_engine_lib_pathYesYesYesGlobalNo
daemon_memcached_optionYesYesYesGlobalNo
daemon_memcached_r_batch_sizeYesYesYesGlobalNo
daemon_memcached_w_batch_sizeYesYesYesGlobalNo
foreign_key_checksYesBothYes
innodbYesYes
innodb_adaptive_flushingYesYesYesGlobalYes
innodb_adaptive_flushing_lwmYesYesYesGlobalYes
innodb_adaptive_hash_indexYesYesYesGlobalYes
innodb_adaptive_hash_index_partsYesYesYesGlobalNo
innodb_adaptive_max_sleep_delayYesYesYesGlobalYes
innodb_api_bk_commit_intervalYesYesYesGlobalYes
innodb_api_disable_rowlockYesYesYesGlobalNo
innodb_api_enable_binlogYesYesYesGlobalNo
innodb_api_enable_mdlYesYesYesGlobalNo
innodb_api_trx_levelYesYesYesGlobalYes
innodb_autoextend_incrementYesYesYesGlobalYes
innodb_autoinc_lock_modeYesYesYesGlobalNo
innodb_background_drop_list_emptyYesYesYesGlobalYes
Innodb_buffer_pool_bytes_dataYesGlobalNo
Innodb_buffer_pool_bytes_dirtyYesGlobalNo
innodb_buffer_pool_chunk_sizeYesYesYesGlobalNo
innodb_buffer_pool_debugYesYesYesGlobalNo
innodb_buffer_pool_dump_at_shutdownYesYesYesGlobalYes
innodb_buffer_pool_dump_nowYesYesYesGlobalYes
innodb_buffer_pool_dump_pctYesYesYesGlobalYes
Innodb_buffer_pool_dump_statusYesGlobalNo
innodb_buffer_pool_filenameYesYesYesGlobalYes
innodb_buffer_pool_in_core_fileYesYesYesGlobalYes
innodb_buffer_pool_instancesYesYesYesGlobalNo
innodb_buffer_pool_load_abortYesYesYesGlobalYes
innodb_buffer_pool_load_at_startupYesYesYesGlobalNo
innodb_buffer_pool_load_nowYesYesYesGlobalYes
Innodb_buffer_pool_load_statusYesGlobalNo
Innodb_buffer_pool_pages_dataYesGlobalNo
Innodb_buffer_pool_pages_dirtyYesGlobalNo
Innodb_buffer_pool_pages_flushedYesGlobalNo
Innodb_buffer_pool_pages_freeYesGlobalNo
Innodb_buffer_pool_pages_latchedYesGlobalNo
Innodb_buffer_pool_pages_miscYesGlobalNo
Innodb_buffer_pool_pages_totalYesGlobalNo
Innodb_buffer_pool_read_aheadYesGlobalNo
Innodb_buffer_pool_read_ahead_evictedYesGlobalNo
Innodb_buffer_pool_read_ahead_rndYesGlobalNo
Innodb_buffer_pool_read_requestsYesGlobalNo
Innodb_buffer_pool_readsYesGlobalNo
Innodb_buffer_pool_resize_statusYesGlobalNo
innodb_buffer_pool_sizeYesYesYesGlobalYes
Innodb_buffer_pool_wait_freeYesGlobalNo
Innodb_buffer_pool_write_requestsYesGlobalNo
innodb_change_buffer_max_sizeYesYesYesGlobalYes
innodb_change_bufferingYesYesYesGlobalYes
innodb_change_buffering_debugYesYesYesGlobalYes
innodb_checkpoint_disabledYesYesYesGlobalYes
innodb_checksum_algorithmYesYesYesGlobalYes
innodb_cmp_per_index_enabledYesYesYesGlobalYes
innodb_commit_concurrencyYesYesYesGlobalYes
innodb_compress_debugYesYesYesGlobalYes
innodb_compression_failure_threshold_pctYesYesYesGlobalYes
innodb_compression_levelYesYesYesGlobalYes
innodb_compression_pad_pct_maxYesYesYesGlobalYes
innodb_concurrency_ticketsYesYesYesGlobalYes
innodb_data_file_pathYesYesYesGlobalNo
Innodb_data_fsyncsYesGlobalNo
innodb_data_home_dirYesYesYesGlobalNo
Innodb_data_pending_fsyncsYesGlobalNo
Innodb_data_pending_readsYesGlobalNo
Innodb_data_pending_writesYesGlobalNo
Innodb_data_readYesGlobalNo
Innodb_data_readsYesGlobalNo
Innodb_data_writesYesGlobalNo
Innodb_data_writtenYesGlobalNo
Innodb_dblwr_pages_writtenYesGlobalNo
Innodb_dblwr_writesYesGlobalNo
innodb_ddl_buffer_sizeYesYesYesSessionYes
innodb_ddl_log_crash_reset_debugYesYesYesGlobalYes
innodb_ddl_threadsYesYesYesSessionYes
innodb_deadlock_detectYesYesYesGlobalYes
innodb_dedicated_serverYesYesYesGlobalNo
innodb_default_row_formatYesYesYesGlobalYes
innodb_directoriesYesYesYesGlobalNo
innodb_disable_sort_file_cacheYesYesYesGlobalYes
innodb_doublewriteYesYesYesGlobalVaries
innodb_doublewrite_batch_sizeYesYesYesGlobalNo
innodb_doublewrite_dirYesYesYesGlobalNo
innodb_doublewrite_filesYesYesYesGlobalNo
innodb_doublewrite_pagesYesYesYesGlobalNo
innodb_fast_shutdownYesYesYesGlobalYes
innodb_fil_make_page_dirty_debugYesYesYesGlobalYes
innodb_file_per_tableYesYesYesGlobalYes
innodb_fill_factorYesYesYesGlobalYes
innodb_flush_log_at_timeoutYesYesYesGlobalYes
innodb_flush_log_at_trx_commitYesYesYesGlobalYes
innodb_flush_methodYesYesYesGlobalNo
innodb_flush_neighborsYesYesYesGlobalYes
innodb_flush_syncYesYesYesGlobalYes
innodb_flushing_avg_loopsYesYesYesGlobalYes
innodb_force_load_corruptedYesYesYesGlobalNo
innodb_force_recoveryYesYesYesGlobalNo
innodb_fsync_thresholdYesYesYesGlobalYes
innodb_ft_aux_tableYesGlobalYes
innodb_ft_cache_sizeYesYesYesGlobalNo
innodb_ft_enable_diag_printYesYesYesGlobalYes
innodb_ft_enable_stopwordYesYesYesBothYes
innodb_ft_max_token_sizeYesYesYesGlobalNo
innodb_ft_min_token_sizeYesYesYesGlobalNo
innodb_ft_num_word_optimizeYesYesYesGlobalYes
innodb_ft_result_cache_limitYesYesYesGlobalYes
innodb_ft_server_stopword_tableYesYesYesGlobalYes
innodb_ft_sort_pll_degreeYesYesYesGlobalNo
innodb_ft_total_cache_sizeYesYesYesGlobalNo
innodb_ft_user_stopword_tableYesYesYesBothYes
Innodb_have_atomic_builtinsYesGlobalNo
innodb_idle_flush_pctYesYesYesGlobalYes
innodb_io_capacityYesYesYesGlobalYes
innodb_io_capacity_maxYesYesYesGlobalYes
innodb_limit_optimistic_insert_debugYesYesYesGlobalYes
innodb_lock_wait_timeoutYesYesYesBothYes
innodb_log_buffer_sizeYesYesYesGlobalVaries
innodb_log_checkpoint_fuzzy_nowYesYesYesGlobalYes
innodb_log_checkpoint_nowYesYesYesGlobalYes
innodb_log_checksumsYesYesYesGlobalYes
innodb_log_compressed_pagesYesYesYesGlobalYes
innodb_log_file_sizeYesYesYesGlobalNo
innodb_log_files_in_groupYesYesYesGlobalNo
innodb_log_group_home_dirYesYesYesGlobalNo
innodb_log_spin_cpu_abs_lwmYesYesYesGlobalYes
innodb_log_spin_cpu_pct_hwmYesYesYesGlobalYes
innodb_log_wait_for_flush_spin_hwmYesYesYesGlobalYes
Innodb_log_waitsYesGlobalNo
innodb_log_write_ahead_sizeYesYesYesGlobalYes
Innodb_log_write_requestsYesGlobalNo
innodb_log_writer_threadsYesYesYesGlobalYes
Innodb_log_writesYesGlobalNo
innodb_lru_scan_depthYesYesYesGlobalYes
innodb_max_dirty_pages_pctYesYesYesGlobalYes
innodb_max_dirty_pages_pct_lwmYesYesYesGlobalYes
innodb_max_purge_lagYesYesYesGlobalYes
innodb_max_purge_lag_delayYesYesYesGlobalYes
innodb_max_undo_log_sizeYesYesYesGlobalYes
innodb_merge_threshold_set_all_debugYesYesYesGlobalYes
innodb_monitor_disableYesYesYesGlobalYes
innodb_monitor_enableYesYesYesGlobalYes
innodb_monitor_resetYesYesYesGlobalYes
innodb_monitor_reset_allYesYesYesGlobalYes
Innodb_num_open_filesYesGlobalNo
innodb_numa_interleaveYesYesYesGlobalNo
innodb_old_blocks_pctYesYesYesGlobalYes
innodb_old_blocks_timeYesYesYesGlobalYes
innodb_online_alter_log_max_sizeYesYesYesGlobalYes
innodb_open_filesYesYesYesGlobalVaries
innodb_optimize_fulltext_onlyYesYesYesGlobalYes
Innodb_os_log_fsyncsYesGlobalNo
Innodb_os_log_pending_fsyncsYesGlobalNo
Innodb_os_log_pending_writesYesGlobalNo
Innodb_os_log_writtenYesGlobalNo
innodb_page_cleanersYesYesYesGlobalNo
Innodb_page_sizeYesGlobalNo
innodb_page_sizeYesYesYesGlobalNo
Innodb_pages_createdYesGlobalNo
Innodb_pages_readYesGlobalNo
Innodb_pages_writtenYesGlobalNo
innodb_parallel_read_threadsYesYesYesSessionYes
innodb_print_all_deadlocksYesYesYesGlobalYes
innodb_print_ddl_logsYesYesYesGlobalYes
innodb_purge_batch_sizeYesYesYesGlobalYes
innodb_purge_rseg_truncate_frequencyYesYesYesGlobalYes
innodb_purge_threadsYesYesYesGlobalNo
innodb_random_read_aheadYesYesYesGlobalYes
innodb_read_ahead_thresholdYesYesYesGlobalYes
innodb_read_io_threadsYesYesYesGlobalNo
innodb_read_onlyYesYesYesGlobalNo
innodb_redo_log_archive_dirsYesYesYesGlobalYes
innodb_redo_log_capacityYesYesYesGlobalYes
Innodb_redo_log_capacity_resizedYesGlobalNo
Innodb_redo_log_checkpoint_lsnYesGlobalNo
Innodb_redo_log_current_lsnYesGlobalNo
Innodb_redo_log_enabledYesGlobalNo
innodb_redo_log_encryptYesYesYesGlobalYes
Innodb_redo_log_flushed_to_disk_lsnYesGlobalNo
Innodb_redo_log_logical_sizeYesGlobalNo
Innodb_redo_log_physical_sizeYesGlobalNo
Innodb_redo_log_read_onlyYesGlobalNo
Innodb_redo_log_resize_statusYesGlobalNo
Innodb_redo_log_uuidYesGlobalNo
innodb_replication_delayYesYesYesGlobalYes
innodb_rollback_on_timeoutYesYesYesGlobalNo
innodb_rollback_segmentsYesYesYesGlobalYes
Innodb_row_lock_current_waitsYesGlobalNo
Innodb_row_lock_timeYesGlobalNo
Innodb_row_lock_time_avgYesGlobalNo
Innodb_row_lock_time_maxYesGlobalNo
Innodb_row_lock_waitsYesGlobalNo
Innodb_rows_deletedYesGlobalNo
Innodb_rows_insertedYesGlobalNo
Innodb_rows_readYesGlobalNo
Innodb_rows_updatedYesGlobalNo
innodb_saved_page_number_debugYesYesYesGlobalYes
innodb_segment_reserve_factorYesYesYesGlobalYes
innodb_sort_buffer_sizeYesYesYesGlobalNo
innodb_spin_wait_delayYesYesYesGlobalYes
innodb_spin_wait_pause_multiplierYesYesYesGlobalYes
innodb_stats_auto_recalcYesYesYesGlobalYes
innodb_stats_include_delete_markedYesYesYesGlobalYes
innodb_stats_methodYesYesYesGlobalYes
innodb_stats_on_metadataYesYesYesGlobalYes
innodb_stats_persistentYesYesYesGlobalYes
innodb_stats_persistent_sample_pagesYesYesYesGlobalYes
innodb_stats_transient_sample_pagesYesYesYesGlobalYes
innodb-status-fileYesYes
innodb_status_outputYesYesYesGlobalYes
innodb_status_output_locksYesYesYesGlobalYes
innodb_strict_modeYesYesYesBothYes
innodb_sync_array_sizeYesYesYesGlobalNo
innodb_sync_debugYesYesYesGlobalNo
innodb_sync_spin_loopsYesYesYesGlobalYes
Innodb_system_rows_deletedYesGlobalNo
Innodb_system_rows_insertedYesGlobalNo
Innodb_system_rows_readYesGlobalNo
Innodb_system_rows_updatedYesGlobalNo
innodb_table_locksYesYesYesBothYes
innodb_temp_data_file_pathYesYesYesGlobalNo
innodb_temp_tablespaces_dirYesYesYesGlobalNo
innodb_thread_concurrencyYesYesYesGlobalYes
innodb_thread_sleep_delayYesYesYesGlobalYes
innodb_tmpdirYesYesYesBothYes
Innodb_truncated_status_writesYesGlobalNo
innodb_trx_purge_view_update_only_debugYesYesYesGlobalYes
innodb_trx_rseg_n_slots_debugYesYesYesGlobalYes
innodb_undo_directoryYesYesYesGlobalNo
innodb_undo_log_encryptYesYesYesGlobalYes
innodb_undo_log_truncateYesYesYesGlobalYes
innodb_undo_tablespacesYesYesYesGlobalVaries
Innodb_undo_tablespaces_activeYesGlobalNo
Innodb_undo_tablespaces_explicitYesGlobalNo
Innodb_undo_tablespaces_implicitYesGlobalNo
Innodb_undo_tablespaces_totalYesGlobalNo
innodb_use_fdatasyncYesYesYesGlobalYes
innodb_use_native_aioYesYesYesGlobalNo
innodb_validate_tablespace_pathsYesYesYesGlobalNo
innodb_versionYesGlobalNo
innodb_write_io_threadsYesYesYesGlobalNo
unique_checksYesBothYes

InnoDB Startup Options

  • --innodb[=value]

    Command-Line Format--innodb[=value]
    DeprecatedYes
    TypeEnumeration
    Default ValueON
    Valid Values

    OFF

    ON

    FORCE

    Controls loading of theInnoDB storage engine, if the server was compiled withInnoDB support. This option has a tristate format, with possible values ofOFF,ON, orFORCE. SeeSection 7.6.1, “Installing and Uninstalling Plugins”.

    To disableInnoDB, use--innodb=OFF or--skip-innodb. In this case, because the default storage engine isInnoDB, the server does not start unless you also use--default-storage-engine and--default-tmp-storage-engine to set the default to some other engine for both permanent andTEMPORARY tables.

    TheInnoDB storage engine can no longer be disabled, and the--innodb=OFF and--skip-innodb options are deprecated and have no effect. Their use results in a warning. Expect these options to be removed in a future MySQL release.

  • --innodb-dedicated-server

    Command-Line Format--innodb-dedicated-server[={OFF|ON}]
    System Variableinnodb_dedicated_server
    ScopeGlobal
    DynamicNo
    SET_VAR Hint AppliesNo
    TypeBoolean
    Default ValueOFF

    When this option is set by starting the server with--innodb-dedicated-server or--innodb-dedicated-server=ON, either on the command line or in amy.cnf file,InnoDB automatically calculates and sets the values of the following variables:

    Note

    innodb_log_file_size andinnodb_log_files_in_group are deprecated in MySQL 8.0.30. These variables are superseded byinnodb_redo_log_capacity. SeeSection 17.6.5, “Redo Log”.

    You should consider using--innodb-dedicated-server only if the MySQL instance resides on a dedicated server where it can use all available system resources. Using this option is not recommended if the MySQL instance shares system resources with other applications.

    It is strongly recommended that you readSection 17.8.12, “Enabling Automatic InnoDB Configuration for a Dedicated MySQL Server”, before using this option in production.

  • --innodb-status-file

    Command-Line Format--innodb-status-file[={OFF|ON}]
    TypeBoolean
    Default ValueOFF

    The--innodb-status-file startup option controls whetherInnoDB creates a file namedinnodb_status.pid in the data directory and writesSHOW ENGINE INNODB STATUS output to it every 15 seconds, approximately.

    Theinnodb_status.pid file is not created by default. To create it, startmysqld with the--innodb-status-file option.InnoDB removes the file when the server is shut down normally. If an abnormal shutdown occurs, the status file may have to be removed manually.

    The--innodb-status-file option is intended for temporary use, asSHOW ENGINE INNODB STATUS output generation can affect performance, and theinnodb_status.pid file can become quite large over time.

    For related information, seeSection 17.17.2, “Enabling InnoDB Monitors”.

  • --skip-innodb

    Disable theInnoDB storage engine. See the description of--innodb.

InnoDB System Variables