You need to enable JavaScript to run this app.
导航
可修改参数列表(MySQL 8.0)
最近更新时间:2024.03.25 21:38:31首次发布时间:2023.03.15 17:15:36

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

序号参数名参数默认值是否需要重启取值范围
1auto_increment_increment1[1-65535]
2auto_increment_offset1[1-65535]
3automatic_sp_privilegesON[ON|OFF]
4avoid_temporal_upgradeOFF[ON|OFF]
5back_log3000[0-65535]
6binlog_cache_size2097152[4096-16777216]
7binlog_checksumCRC32[CRC32|NONE]
8binlog_order_commitsON[ON|OFF]
9binlog_row_imagefull[full|minimal]
10binlog_rows_query_log_eventsOFF[ON|OFF]
11binlog_stmt_cache_size32768[4096-16777216]
12block_encryption_modeaes-128-ecb[aes-128-ecb|aes-192-ecb|aes-256-ecb|aes-128-cbc|aes-192-cbc|aes-256-cbc]
13bulk_insert_buffer_size4194304[0-4294967295]
14character_set_filesystembinary[utf8|latin1|gbk|binary]
15character_set_serverutf8mb3[utf8mb3|latin1|gbk|gb18030|utf8mb4]
16collation_serverutf8_general_ci[utf8mb4_0900_ai_ci|utf8mb4_0900_as_ci|utf8mb4_0900_as_cs|utf8mb4_bin|utf8mb4_croatian_ci|utf8mb4_cs_0900_ai_ci|utf8mb4_cs_0900_as_cs|utf8mb4_czech_ci|utf8mb4_danish_ci|utf8mb4_da_0900_ai_ci|utf8mb4_da_0900_as_cs|utf8mb4_de_pb_0900_ai_ci|utf8mb4_de_pb_0900_as_cs|utf8mb4_eo_0900_ai_ci|utf8mb4_eo_0900_as_cs|utf8mb4_esperanto_ci|utf8mb4_estonian_ci|utf8mb4_es_0900_ai_ci|utf8mb4_es_0900_as_cs|utf8mb4_es_trad_0900_ai_ci|utf8mb4_es_trad_0900_as_cs|utf8mb4_et_0900_ai_ci|utf8mb4_et_0900_as_cs|utf8mb4_general_ci|utf8mb4_german2_ci|utf8mb4_hr_0900_ai_ci|utf8mb4_hr_0900_as_cs|utf8mb4_hungarian_ci|utf8mb4_hu_0900_ai_ci|utf8mb4_hu_0900_as_cs|utf8mb4_icelandic_ci|utf8mb4_is_0900_ai_ci|utf8mb4_is_0900_as_cs|utf8mb4_ja_0900_as_cs|utf8mb4_ja_0900_as_cs_ks|utf8mb4_latvian_ci|utf8mb4_la_0900_ai_ci|utf8mb4_la_0900_as_cs|utf8mb4_lithuanian_ci|utf8mb4_lt_0900_ai_ci|utf8mb4_lt_0900_as_cs|utf8mb4_lv_0900_ai_ci|utf8mb4_lv_0900_as_cs|utf8mb4_persian_ci|utf8mb4_pl_0900_ai_ci|utf8mb4_pl_0900_as_cs|utf8mb4_polish_ci|utf8mb4_romanian_ci|utf8mb4_roman_ci|utf8mb4_ro_0900_ai_ci|utf8mb4_ro_0900_as_cs|utf8mb4_ru_0900_ai_ci|utf8mb4_ru_0900_as_cs|utf8mb4_sinhala_ci|utf8mb4_sk_0900_ai_ci|utf8mb4_sk_0900_as_cs|utf8mb4_slovak_ci|utf8mb4_slovenian_ci|utf8mb4_sl_0900_ai_ci|utf8mb4_sl_0900_as_cs|utf8mb4_spanish2_ci|utf8mb4_spanish_ci|utf8mb4_sv_0900_ai_ci|utf8mb4_sv_0900_as_cs|utf8mb4_swedish_ci|utf8mb4_tr_0900_ai_ci|utf8mb4_tr_0900_as_cs|utf8mb4_turkish_ci|utf8mb4_unicode_520_ci|utf8mb4_unicode_ci|utf8mb4_vietnamese_ci|utf8mb4_vi_0900_ai_ci|utf8mb4_vi_0900_as_cs|utf8mb4_zh_0900_as_cs|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|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]
17concurrent_insertAUTO[NEVER|AUTO|ALWAYS]
18connect_timeout10[1-3600]
19default_storage_engineInnoDB[InnoDB|innodb]
20default_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|+5:45|+6:00|+6:30|+7:00|+8:00|+9:00|+10:00|+11:00|+12:00|+13:00]
21default_week_format0[0-7]
22delay_key_writeON[ON|OFF|ALL]
23delayed_insert_limit100[1-4294967295]
24delayed_insert_timeout300[1-3600]
25delayed_queue_size1000[1-4294967295]
26disconnect_on_expired_passwordON[ON|OFF]
27div_precision_increment4[0-30]
28end_markers_in_jsonOFF[ON|OFF]
29eq_range_index_dive_limit100[0-4294967295]
30event_schedulerOFF[ON|OFF]
31explicit_defaults_for_timestampOFF[ON|OFF]
32flush_time0[0-31536000]
33ft_max_word_len84[10-84]
34ft_min_word_len4[1-84]
35ft_query_expansion_limit20[0-1000]
36general_logOFF[OFF]
37group_concat_max_len1024[4-1844674407370954752]
38host_cache_size644[0-65535]
39init_connect-[空|set names utf8mb4|set names utf8|set names utf8mb4 collate utf8mb4_general_ci]
40innodb_adaptive_flushingON[ON|OFF]
41innodb_adaptive_flushing_lwm10[0-70]
42innodb_adaptive_hash_indexOFF[ON|OFF]
43innodb_adaptive_max_sleep_delay150000[1-1000000]
44innodb_autoextend_increment64[1-1000]
45innodb_autoinc_lock_mode2[0|1|2]
46innodb_buffer_pool_dump_at_shutdownON[ON|OFF]
47innodb_buffer_pool_dump_pct25[1-100]
48innodb_buffer_pool_instances2[1-64]
49innodb_buffer_pool_load_at_startupON[ON|OFF]
50innodb_buffer_pool_size1073741824[134217728-1099511627776]
51innodb_change_buffer_max_size25[0-50]
52innodb_change_bufferingall[none|inserts|deletes|changes|purges|all]
53innodb_checksum_algorithmcrc32[innodb|crc32|none|strict_innodb|strict_crc32|strict_none]
54innodb_cmp_per_index_enabledOFF[ON|OFF]
55innodb_commit_concurrency0[0-1000]
56innodb_compression_failure_threshold_pct5[0-100]
57innodb_compression_level6[0-9]
58innodb_compression_pad_pct_max50[0-70]
59innodb_concurrency_tickets5000[1-4294967295]
60innodb_deadlock_detectON[ON|OFF]
61innodb_disable_sort_file_cacheOFF[ON|OFF]
62innodb_flush_log_at_trx_commit1[0|1|2]
63innodb_flush_methodO_DIRECT[fsync|O_DSYNC|littlesync|nosync|O_DIRECT|O_DIRECT_NO_FSYNC]
64innodb_flush_neighbors0[0|1|2]
65innodb_flush_syncON[ON|OFF]
66innodb_ft_cache_size8000000[1600000-80000000]
67innodb_ft_enable_diag_printOFF[ON|OFF]
68innodb_ft_enable_stopwordON[ON|OFF]
69innodb_ft_max_token_size84[10-84]
70innodb_ft_min_token_size3[0-16]
71innodb_ft_num_word_optimize2000[0-10000]
72innodb_ft_result_cache_limit2000000000[1000000-4294967295]
73innodb_ft_sort_pll_degree2[1-16]
74innodb_ft_total_cache_size640000000[32000000-1600000000]
75innodb_io_capacity1000[0-18446744073709551615]
76innodb_io_capacity_max2000[0-18446744073709551615]
77innodb_lock_wait_timeout50[1-1073741824]
78innodb_log_checksumsON[ON|OFF]
79innodb_log_compressed_pagesOFF[ON|OFF]
80innodb_lru_scan_depth1024[100-18446744073709551615]
81innodb_max_dirty_pages_pct75[0-99]
82innodb_max_dirty_pages_pct_lwm0[0-99]
83innodb_max_purge_lag0[0-4294967295]
84innodb_max_purge_lag_delay0[0-10000000]
85innodb_max_undo_log_size1073741824[10485760-18446744073709551615]
86innodb_monitor_enableall[all]
87innodb_old_blocks_pct37[5-95]
88innodb_old_blocks_time1000[0-1024]
89innodb_online_alter_log_max_size134217728[134217728-2147483647]
90innodb_open_files3000[1-8192]
91innodb_optimize_fulltext_onlyOFF[ON|OFF]
92innodb_page_cleaners2[1-64]
93innodb_print_all_deadlocksON[ON|OFF]
94innodb_purge_batch_size300[1-5000]
95innodb_purge_rseg_truncate_frequency128[1-128]
96innodb_purge_threads1[1-32]
97innodb_random_read_aheadOFF[ON|OFF]
98innodb_read_ahead_threshold56[0-1024]
99innodb_read_io_threads1[1-64]
100innodb_rollback_on_timeoutOFF[ON|OFF]
101innodb_rollback_segments128[1-128]
102innodb_sort_buffer_size1048576[65536-67108864]
103innodb_spin_wait_delay6[0-4294967295]
104innodb_stats_auto_recalcON[ON|OFF]
105innodb_stats_methodnulls_equal[nulls_equal|nulls_unequal|nulls_ignored]
106innodb_stats_on_metadataOFF[ON|OFF]
107innodb_stats_persistentON[ON|OFF]
108innodb_stats_persistent_sample_pages20[0-4294967295]
109innodb_stats_transient_sample_pages8[1-4294967295]
110innodb_status_outputOFF[ON|OFF]
111innodb_status_output_locksOFF[ON|OFF]
112innodb_strict_modeOFF[ON|OFF]
113innodb_sync_array_size512[1-1024]
114innodb_sync_spin_loops30[0-4294967295]
115innodb_table_locksON[ON|OFF]
116innodb_thread_concurrency0[0-1000]
117innodb_thread_sleep_delay10000[0-1000000]
118innodb_write_io_threads1[1-64]
119interactive_timeout7200[10-86400]
120join_buffer_size262144[128-4294967295]
121key_cache_age_threshold300[100-4294967295]
122key_cache_block_size1024[512-16384]
123key_cache_division_limit100[1-100]
124lc_time_namesen_US[ja_JP|pt_BR|en_US]
125local_infileON[ON|OFF]
126lock_wait_timeout31536000[1-31536000]
127log_error_verbosity2[1-3]
128log_queries_not_using_indexesOFF[ON|OFF]
129log_slow_admin_statementsOFF[ON|OFF]
130log_throttle_queries_not_using_indexes0[0-4294967295]
131long_query_time1[0.1-31536000]
132loose_kill_idle_transaction0[0-31536000]
133loose_rds_performance_schemaOFF[ON|OFF]
134loose_thread_pool_enabledON[ON|OFF]
135loose_thread_pool_oversubscribe16[2-128]
136loose_thread_pool_size2[1-64]
137low_priority_updatesOFF[ON|OFF]
138max_allowed_packet1073741824[16384-1073741824]
139max_binlog_cache_size18400000000000000000[4096-18446744073709547520]
140max_binlog_stmt_cache_size18400000000000000000[4096-18446744073709547520]
141max_connect_errors100[0-4294967295]
142max_connections600[100-100000]
143max_error_count64[0-65535]
144max_execution_time0[0-4294967295]
145max_heap_table_size67108864[16384-1844674407370954752]
146max_join_size18446744073709551615[1-18446744073709551615]
147max_length_for_sort_data1024[4-8388608]
148max_points_in_geometry65536[3-1048576]
149max_prepared_stmt_count16382[0-1048576]
150max_seeks_for_key18400000000000000000[1-18446744073709551615]
151max_sort_length1024[4-8388608]
152max_sp_recursion_depth0[0-255]
153max_user_connections0[0|100-100000]
154max_write_lock_count102400[1-102400]
155min_examined_row_limit0[0-4294967295]
156myisam_sort_buffer_size262144[262144-16777216]
157mysql_native_password_proxy_usersOFF[ON|OFF]
158net_buffer_length16384[1024-1048576]
159net_read_timeout30[1-31536000]
160net_retry_count10[1-4294967295]
161net_write_timeout60[1-31536000]
162ngram_token_size2[1-10]
163open_files_limit1048576[1-18446744073709551615]
164optimizer_prune_level1[0|1]
165optimizer_search_depth62[0-62]
166optimizer_trace_limit1[0-4294967295]
167optimizer_trace_max_mem_size16384[0-4294967295]
168optimizer_trace_offset-1[-2147483648-2147483647]
169performance_schemaOFF[ON|OFF]
170preload_buffer_size32768[1024-1073741824]
171query_alloc_block_size8192[1024-16384]
172query_prealloc_size8192[8192-1048576]
173range_alloc_block_size4096[4096-18446744073709551615]
174range_optimizer_max_mem_size8388608[0-18446744073709551615]
175read_buffer_size262144[8200-2147479552]
176relay_log_recoveryON[ON|OFF]
177replica_net_timeout60[1-31536000]
178replica_type_conversions-[*空|ALL_LOSSY|ALL_NON_LOSSY|ALL_SIGNED|ALL_UNSIGNED]
179session_track_gtidsOFF[OFF|OWN_GTID|ALL_GTIDS]
180sha256_password_proxy_usersOFF[ON|OFF]
181show_old_temporalsOFF[ON|OFF]
182slow_launch_time2[1-1024]
183slow_query_logON[ON|OFF]
184sort_buffer_size262144[32768-4294967295]
185source_verify_checksumOFF[ON|OFF]
186sql_modeONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION[*ALLOW_INVALID_DATES|ANSI_QUOTES|ERROR_FOR_DIVISION_BY_ZERO|HIGH_NOT_PRECEDENCE|IGNORE_SPACE|NO_AUTO_VALUE_ON_ZERO|NO_BACKSLASH_ESCAPES|NO_DIR_IN_CREATE|NO_ENGINE_SUBSTITUTION|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|TIME_TRUNCATE_FRACTIONAL]
187sql_safe_updatesOFF[ON|OFF]
188stored_program_cache256[16-524288]
189sync_binlog1[0-4294967295]
190sync_relay_log_info10000[0-4294967295]
191sync_source_info10000[0-4294967295]
192table_definition_cache1024[400-524288]
193table_open_cache512[1-524288]
194table_open_cache_instances2[1-64]
195thread_cache_size100[0-16384]
196thread_stack1048576[131072-2147483647]
197tmp_table_size2097152[262144-134217728]
198transaction_alloc_block_size8192[1024-131072]
199transaction_isolationREAD-COMMITTED[READ-UNCOMMITTED|READ-COMMITTED|REPEATABLE-READ|SERIALIZABLE]
200transaction_prealloc_size4096[1024-131072]
201updatable_views_with_limitYES[YES|NO]
202wait_timeout86400[1-31536000]
203loose_innodb_data_file_logic_dropOFF[ON
204loose_innodb_data_file_logic_drop_max_size1024[128-2048]

常见问题

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

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