You need to enable JavaScript to run this app.
导航
可修改参数列表(MySQL 5.7)
最近更新时间:2024.08.30 14:33:09首次发布时间:2023.03.15 17:15:36

本文介绍云数据库 MySQL 版为 MySQL 5.7 实例提供的可修改参数,以及参数的默认值、修改后是否需要重启和取值范围。

参数名参数默认值是否需要重启取值范围
auto_increment_increment1[1-65535]
auto_increment_offset1[1-65535]
automatic_sp_privilegesON[ON|OFF]
avoid_temporal_upgradeOFF[ON|OFF]
back_log3000[1-65535]
binlog_cache_size2097152[4096-16777216]
binlog_checksumCRC32[CRC32|NONE]
binlog_order_commitsON[ON|OFF]
binlog_row_imagefull[full|minimal]
binlog_rows_query_log_eventsOFF[ON|OFF]
binlog_stmt_cache_size32768[4096-16777216]
block_encryption_modeaes-128-ecb[aes-128-ecb|aes-192-ecb|aes-256-ecb|aes-128-cbc|aes-192-cbc|aes-256-cbc]
bulk_insert_buffer_size4194304[0-4294967295]
character_set_filesystembinary[utf8|latin1|gbk|binary]
character_set_serverutf8[utf8|latin1|gbk|gb18030|utf8mb4]
collation_serverutf8_general_ci[utf8_general_ci|utf8_bin|utf8_unicode_ci|utf8_icelandic_ci|utf8_latvian_ci|utf8_romanian_ci|utf8_slovenian_ci|utf8_polish_ci|utf8_estonian_ci|utf8_spanish_ci|utf8_swedish_ci|utf8_turkish_ci|utf8_czech_ci|utf8_danish_ci|utf8_lithuanian_ci|utf8_slovak_ci|utf8_spanish2_ci|utf8_roman_ci|utf8_persian_ci|utf8_esperanto_ci|utf8_hungarian_ci|utf8_sinhala_ci|utf8_german2_ci|utf8_croatian_ci|utf8_unicode_520_ci|utf8_vietnamese_ci|utf8_general_mysql500_ci|latin1_bin|latin1_danish_ci|latin1_general_ci|latin1_general_cs|latin1_german1_ci|latin1_german2_ci|latin1_spanish_ci|latin1_swedish_ci|gbk_bin|gbk_chinese_ci|gb18030_bin|gb18030_chinese_ci|gb18030_unicode_520_ci|utf8mb4_general_ci|utf8mb4_bin|utf8mb4_unicode_ci|utf8mb4_icelandic_ci|utf8mb4_latvian_ci|utf8mb4_romanian_ci|utf8mb4_slovenian_ci|utf8mb4_polish_ci|utf8mb4_estonian_ci|utf8mb4_spanish_ci|utf8mb4_swedish_ci|utf8mb4_turkish_ci|utf8mb4_czech_ci|utf8mb4_danish_ci|utf8mb4_lithuanian_ci|utf8mb4_slovak_ci|utf8mb4_spanish2_ci|utf8mb4_roman_ci|utf8mb4_persian_ci|utf8mb4_esperanto_ci|utf8mb4_hungarian_ci|utf8mb4_sinhala_ci|utf8mb4_german2_ci|utf8mb4_croatian_ci|utf8mb4_unicode_520_ci|utf8mb4_vietnamese_ci]
concurrent_insertAUTO[NEVER|AUTO|ALWAYS]
connect_timeout10[2-3600]
default_time_zone+08:00[SYSTEM|-12:00|-11:00|-10:00|-9:00|-8:00|-7:00|-6:00|-5:00|-4:00|-3:00|-2:00|-1:00|+0:00|+1:00|+2:00|+3:00|+4:00|+5:00|+5:30|+6:00|+6:30|+7:00|+8:00|+9:00|+10:00|+11:00|+12:00|+13:00]
default_week_format0[0-7]
delay_key_writeON[ON|OFF|ALL]
delayed_insert_timeout300[1-3600]
disconnect_on_expired_passwordON[ON|OFF]
div_precision_increment4[0-30]
end_markers_in_jsonOFF[ON|OFF]
eq_range_index_dive_limit100[0-4294967295]
event_schedulerOFF[ON|OFF]
explicit_defaults_for_timestampOFF[ON|OFF]
flush_time0[0-31536000]
ft_max_word_len84[10-84]
ft_min_word_len4[1-84]
ft_query_expansion_limit20[0-1000]
general_logOFF[OFF]
group_concat_max_len1024[4-1844674407370954752]
host_cache_size644[0-65535]
init_connect-[空|set names utf8mb4|set names utf8|set names utf8mb4 collate utf8mb4_general_ci]
innodb_adaptive_flushingON[ON|OFF]
innodb_adaptive_flushing_lwm10[0-70]
innodb_adaptive_hash_indexOFF[ON|OFF]
innodb_adaptive_max_sleep_delay150000[1-1000000]
innodb_autoextend_increment64[1-1000]
innodb_autoinc_lock_mode2[0|1|2]
innodb_buffer_pool_dump_at_shutdownON[ON|OFF]
innodb_buffer_pool_dump_pct25[1-100]
innodb_buffer_pool_instances2[1-64]
innodb_buffer_pool_load_at_startupON[ON|OFF]
innodb_buffer_pool_size1073741824[134217728-1099511627776]
innodb_change_buffer_max_size25[0-50]
innodb_change_bufferingall[none|inserts|deletes|changes|purges|all]
innodb_checksum_algorithmcrc32[innodb|crc32|none|strict_innodb|strict_crc32|strict_none]
innodb_cmp_per_index_enabledOFF[ON|OFF]
innodb_commit_concurrency0[0-1000]
innodb_compression_failure_threshold_pct5[0-100]
innodb_compression_level6[0-9]
innodb_compression_pad_pct_max50[0-70]
innodb_concurrency_tickets5000[1-4294967295]
innodb_deadlock_detectON[ON|OFF]
innodb_disable_sort_file_cacheOFF[ON|OFF]
innodb_flush_log_at_trx_commit1[0|1|2]
innodb_flush_methodO_DIRECT[fsync|O_DSYNC|O_DIRECT|O_DIRECT_NO_FSYNC]
innodb_flush_neighbors0[0|1|2]
innodb_flush_syncON[ON|OFF]
innodb_ft_cache_size8000000[1600000-80000000]
innodb_ft_enable_diag_printOFF[ON|OFF]
innodb_ft_enable_stopwordON[ON|OFF]
innodb_ft_max_token_size84[10-84]
innodb_ft_min_token_size3[0-16]
innodb_ft_num_word_optimize2000[0-10000]
innodb_ft_result_cache_limit2000000000[1000000-4294967295]
innodb_ft_sort_pll_degree2[1-16]
innodb_ft_total_cache_size640000000[32000000-1600000000]
innodb_io_capacity1000[100-4294967295]
innodb_io_capacity_max2000[100-4294967295]
innodb_large_prefixON[ON|OFF]
innodb_lock_wait_timeout50[1-1073741824]
innodb_log_checksumsON[ON|OFF]
innodb_log_compressed_pagesOFF[ON|OFF]
innodb_lru_scan_depth1024[100-4294967295]
innodb_max_dirty_pages_pct75[0-99]
innodb_max_dirty_pages_pct_lwm0[0-99]
innodb_max_purge_lag0[0-4294967295]
innodb_max_purge_lag_delay0[0-10000000]
innodb_max_undo_log_size1073741824[10485760-18446744073709551615]
innodb_monitor_enableall[all]
innodb_old_blocks_pct37[5-95]
innodb_old_blocks_time1000[0-1024]
innodb_online_alter_log_max_size134217728[134217728-2147483647]
innodb_open_files3000[10-8192]
innodb_optimize_fulltext_onlyOFF[ON|OFF]
innodb_page_cleaners2[1-64]
innodb_print_all_deadlocksON[OFF|ON]
innodb_purge_batch_size300[1-5000]
innodb_purge_rseg_truncate_frequency128[1-128]
innodb_purge_threads1[1-32]
innodb_random_read_aheadOFF[ON|OFF]
innodb_read_ahead_threshold56[0-1024]

innodb_read_io_threads

4

[1-64]

说明

该参数的运行值和默认值会在创建实例时根据实例的规格计算。如果在创建实例后手动修改了该参数的运行值,则以设置的值为准。

innodb_rollback_on_timeoutOFF[OFF|ON]
innodb_rollback_segments128[1-128]
innodb_spin_wait_delay6[0-4294967295]
innodb_stats_auto_recalcON[ON|OFF]
innodb_stats_methodnulls_equal[nulls_equal|nulls_unequal|nulls_ignored]
innodb_stats_on_metadataOFF[ON|OFF]
innodb_stats_persistentON[ON|OFF]
innodb_stats_persistent_sample_pages20[0-4294967295]
innodb_stats_sample_pages8[1-4294967296]
innodb_stats_transient_sample_pages8[1-4294967295]
innodb_status_outputOFF[ON|OFF]
innodb_status_output_locksOFF[ON|OFF]
innodb_strict_modeOFF[ON|OFF]
innodb_sync_array_size512[1-1024]
innodb_sync_spin_loops30[0-4294967295]
innodb_table_locksON[ON|OFF]
innodb_temp_data_file_pathibtmp1:50M:autoextend:max:30G-
innodb_thread_concurrency0[0-1000]
innodb_thread_sleep_delay10000[0-1000000]
innodb_undo_log_truncateOFF[ON|OFF]

innodb_write_io_threads

4

[1-64]

说明

该参数的运行值和默认值会在创建实例时根据实例的规格计算。如果在创建实例后手动修改了该参数的运行值,则以设置的值为准。

interactive_timeout7200[10-86400]
join_buffer_size262144[128-4294967295]
key_cache_age_threshold300[100-4294967295]
key_cache_block_size1024[512-16384]
key_cache_division_limit100[1-100]
lc_time_namesen_US[ja_JP|pt_BR|en_US]
local_infileON[ON|OFF]
lock_wait_timeout31536000[1-31536000]
log_bin_use_v1_row_eventsOFF[ON|OFF]
log_error_verbosity2[1-3]
log_queries_not_using_indexesOFF[ON|OFF]
log_slow_admin_statementsOFF[ON|OFF]
log_throttle_queries_not_using_indexes0[0-4294967295]
long_query_time1[0.1-31536000]
loose_thread_pool_enabledON[ON|OFF]
loose_thread_pool_oversubscribe16[2-128]
loose_thread_pool_size2[1-64]
low_priority_updatesOFF[ON|OFF]
lower_case_table_names1[0|1]
master_verify_checksumOFF[ON|OFF]
max_allowed_packet1073741824[16384-1073741824]
max_binlog_cache_size18446744073709547520[4096-18446744073709547520]
max_binlog_stmt_cache_size18400000000000000000[4096-18446744073709547520]
max_connect_errors100[0-4294967295]
max_connections600[100-100000]
max_error_count64[0-65535]
max_execution_time0[0-4294967295]
max_heap_table_size67108864[16384-1844674407370954752]
max_join_size18446744073709551615[1-18446744073709551615]
max_length_for_sort_data1024[0-838860]
max_points_in_geometry65536[3-1048576]
max_prepared_stmt_count16382[0-1048576]
max_seeks_for_key18400000000000000000[1-18446744073709551615]
max_sort_length1024[4-8388608]
max_sp_recursion_depth0[0-255]
max_user_connections0[0|100-100000]
max_write_lock_count102400[1-102400]
metadata_locks_cache_size1024[1-1048576]
min_examined_row_limit0[0-4294967295]
myisam_sort_buffer_size262144[262144-16777216]
mysql_native_password_proxy_usersOFF[ON|OFF]
net_buffer_length16384[1024-1048576]
net_read_timeout30[1-31536000]
net_retry_count10[1-4294967295]
net_write_timeout60[1-31536000]
ngram_token_size2[1-10]
open_files_limit1048576[4000-1073741824]
optimizer_prune_level1[0|1]
optimizer_search_depth62[0-62]
optimizer_switchbatched_key_access=off,block_nested_loop=on,condition_fanout_filter=on,derived_merge=on,duplicateweedout=on,engine_condition_pushdown=on,firstmatch=on,index_condition_pushdown=on,index_merge=on,index_merge_intersection=on,index_merge_sort_union=on,index_merge_union=on,loosescan=on,materialization=on,mrr=on,mrr_cost_based=on,semijoin=on,subquery_materialization_cost_based=on,use_index_extensions=on-
optimizer_trace_limit1[0-4294967295]
optimizer_trace_max_mem_size16384[0-4294967295]
optimizer_trace_offset-1[-1-4294967295]
performance_schemaOFF[ON|OFF]

performance_schema_max_thread_instances

1024

[-1-1048576]

说明

该参数需与 loose_rds_performance_schema 配合使用,仅在 loose_rds_performance_schema 取值为 ON 时生效。

preload_buffer_size32768[1024-1073741824]
query_alloc_block_size8192[1024-16384]
query_cache_limit1048576[1-1048576]
query_cache_min_res_unit1024[512-18446744073709551608]
query_cache_size0[0-10485760000]
query_cache_typeOFF[OFF|ON|DEMAND]
query_cache_wlock_invalidateOFF[ON|OFF]
query_prealloc_size8192[8192-1048576]
range_alloc_block_size4096[4096-18446744073709551615]
range_optimizer_max_mem_size8388608[0-18446744073709551615]
read_buffer_size262144[8200-2147479552]
relay_log_recoveryON[ON|OFF]
session_track_gtidsOFF[OFF|OWN_GTID|ALL_GTIDS]
sha256_password_proxy_usersOFF[ON|OFF]
show_old_temporalsOFF[ON|OFF]
slave_net_timeout60[1-31536000]
slave_parallel_typeLOGICAL_CLOCK[DATABASE|LOGICAL_CLOCK]
slave_type_conversions-[空|ALL_LOSSY|ALL_NON_LOSSY|ALL_LOSSY,ALL_NON_LOSSY|ALL_SIGNED|ALL_UNSIGNED|ALL_SIGNED,ALL_UNSIGNED]
slow_launch_time2[1-1024]
slow_query_logON[ON|OFF]
sort_buffer_size262144[32768-4294967295]
sql_modeONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION[*ALLOW_INVALID_DATES|ANSI_QUOTES|ERROR_FOR_DIVISION_BY_ZERO|HIGH_NOT_PRECEDENCE|IGNORE_SPACE|NO_AUTO_CREATE_USER|NO_AUTO_VALUE_ON_ZERO|NO_BACKSLASH_ESCAPES|NO_DIR_IN_CREATE|NO_ENGINE_SUBSTITUTION|NO_FIELD_OPTIONS|NO_KEY_OPTIONS|NO_TABLE_OPTIONS|NO_UNSIGNED_SUBTRACTION|NO_ZERO_DATE|NO_ZERO_IN_DATE|ONLY_FULL_GROUP_BY|PAD_CHAR_TO_FULL_LENGTH|PIPES_AS_CONCAT|REAL_AS_FLOAT|STRICT_ALL_TABLES|STRICT_TRANS_TABLES]
sql_safe_updatesOFF[ON|OFF]
stored_program_cache256[16-524288]
sync_binlog1[0-4294967295]
sync_master_info10000[0-4294967295]
sync_relay_log_info10000[0-4294967295]
table_definition_cache1024[400-80480]
table_open_cache512[1-524288]
table_open_cache_instances2[1-64]
thread_cache_size1024[0-16384]
thread_stack1048576[131072-2147483647]
tls_versionTLSv1,TLSv1.1,TLSv1.2[TLSv1,TLSv1.1,TLSv1.2|TLSv1,TLSv1.1|TLSv1.2]
tmp_table_size2097152[262144-1073741824]
transaction_alloc_block_size8192[1024-131072]
transaction_isolationREAD-COMMITTED[READ-UNCOMMITTED|READ-COMMITTED|REPEATABLE-READ|SERIALIZABLE]
transaction_prealloc_size4096[1024-131072]
updatable_views_with_limitYES[YES|NO]
wait_timeout86400[1-31536000]

常见问题

如何查询云数据库 MySQL 版不支持修改的参数的设定值?

可登录数据库工作台,使用 SQL 语句 SHOW variables like '参数名'查看。