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

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

序号参数名参数默认值是否需要重启取值范围
1auto_increment_increment1[1-65535]
2auto_increment_offset1[1-65535]
3automatic_sp_privilegesON[ON|OFF]
4avoid_temporal_upgradeOFF[ON|OFF]
5back_log3000[1-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_serverutf8[utf8|latin1|gbk|gb18030|utf8mb4]
16collation_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]
17concurrent_insertAUTO[NEVER|AUTO|ALWAYS]
18connect_timeout10[2-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|+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_timeout300[1-3600]
24disconnect_on_expired_passwordON[ON|OFF]
25div_precision_increment4[0-30]
26end_markers_in_jsonOFF[ON|OFF]
27eq_range_index_dive_limit100[0-4294967295]
28event_schedulerOFF[ON|OFF]
29explicit_defaults_for_timestampOFF[ON|OFF]
30flush_time0[0-31536000]
31ft_max_word_len84[10-84]
32ft_min_word_len4[1-84]
33ft_query_expansion_limit20[0-1000]
34general_logOFF[OFF]
35group_concat_max_len1024[4-1844674407370954752]
36host_cache_size644[0-65535]
37init_connect-[空|set names utf8mb4|set names utf8|set names utf8mb4 collate utf8mb4_general_ci]
38innodb_adaptive_flushingON[ON|OFF]
39innodb_adaptive_flushing_lwm10[0-70]
40innodb_adaptive_hash_indexOFF[ON|OFF]
41innodb_adaptive_max_sleep_delay150000[1-1000000]
42innodb_autoextend_increment64[1-1000]
43innodb_autoinc_lock_mode2[0|1|2]
44innodb_buffer_pool_dump_at_shutdownON[ON|OFF]
45innodb_buffer_pool_dump_pct25[1-100]
46innodb_buffer_pool_instances2[1-64]
47innodb_buffer_pool_load_at_startupON[ON|OFF]
48innodb_buffer_pool_size1073741824[134217728-1099511627776]
49innodb_change_buffer_max_size25[0-50]
50innodb_change_bufferingall[none|inserts|deletes|changes|purges|all]
51innodb_checksum_algorithmcrc32[innodb|crc32|none|strict_innodb|strict_crc32|strict_none]
52innodb_cmp_per_index_enabledOFF[ON|OFF]
53innodb_commit_concurrency0[0-1000]
54innodb_compression_failure_threshold_pct5[0-100]
55innodb_compression_level6[0-9]
56innodb_compression_pad_pct_max50[0-70]
57innodb_concurrency_tickets5000[1-4294967295]
58innodb_deadlock_detectON[ON|OFF]
59innodb_disable_sort_file_cacheOFF[ON|OFF]
60innodb_flush_log_at_trx_commit1[0|1|2]
61innodb_flush_methodO_DIRECT[fsync|O_DSYNC|O_DIRECT|O_DIRECT_NO_FSYNC]
62innodb_flush_neighbors0[0|1|2]
63innodb_flush_syncON[ON|OFF]
64innodb_ft_cache_size8000000[1600000-80000000]
65innodb_ft_enable_diag_printOFF[ON|OFF]
66innodb_ft_enable_stopwordON[ON|OFF]
67innodb_ft_max_token_size84[10-84]
68innodb_ft_min_token_size3[0-16]
69innodb_ft_num_word_optimize2000[0-10000]
70innodb_ft_result_cache_limit2000000000[1000000-4294967295]
71innodb_ft_sort_pll_degree2[1-16]
72innodb_ft_total_cache_size640000000[32000000-1600000000]
73innodb_io_capacity1000[100-4294967295]
74innodb_io_capacity_max2000[100-4294967295]
75innodb_large_prefixON[ON|OFF]
76innodb_lock_wait_timeout50[1-1073741824]
77innodb_log_checksumsON[ON|OFF]
78innodb_log_compressed_pagesOFF[ON|OFF]
79innodb_lru_scan_depth1024[100-4294967295]
80innodb_max_dirty_pages_pct75[0-99]
81innodb_max_dirty_pages_pct_lwm0[0-99]
82innodb_max_purge_lag0[0-4294967295]
83innodb_max_purge_lag_delay0[0-10000000]
84innodb_max_undo_log_size1073741824[10485760-18446744073709551615]
85innodb_monitor_enableall[all]
86innodb_old_blocks_pct37[5-95]
87innodb_old_blocks_time1000[0-1024]
88innodb_online_alter_log_max_size134217728[134217728-2147483647]
89innodb_open_files3000[10-8192]
90innodb_optimize_fulltext_onlyOFF[ON|OFF]
91innodb_page_cleaners2[1-64]
92innodb_print_all_deadlocksON[OFF|ON]
93innodb_purge_batch_size300[1-5000]
94innodb_purge_rseg_truncate_frequency128[1-128]
95innodb_purge_threads1[1-32]
96innodb_random_read_aheadOFF[ON|OFF]
97innodb_read_ahead_threshold56[0-1024]
98innodb_read_io_threads1[1-64]
99innodb_rollback_on_timeoutOFF[OFF|ON]
100innodb_rollback_segments128[1-128]
101innodb_spin_wait_delay6[0-4294967295]
102innodb_stats_auto_recalcON[ON|OFF]
103innodb_stats_methodnulls_equal[nulls_equal|nulls_unequal|nulls_ignored]
104innodb_stats_on_metadataOFF[ON|OFF]
105innodb_stats_persistentON[ON|OFF]
106innodb_stats_persistent_sample_pages20[0-4294967295]
107innodb_stats_sample_pages8[1-4294967296]
108innodb_stats_transient_sample_pages8[1-4294967295]
109innodb_status_outputOFF[ON|OFF]
110innodb_status_output_locksOFF[ON|OFF]
111innodb_strict_modeOFF[ON|OFF]
112innodb_sync_array_size512[1-1024]
113innodb_sync_spin_loops30[0-4294967295]
114innodb_table_locksON[ON|OFF]
115innodb_temp_data_file_pathibtmp1:50M:autoextend:max:30G-
116innodb_thread_concurrency0[0-1000]
117innodb_thread_sleep_delay10000[0-1000000]
118innodb_undo_log_truncateOFF[ON|OFF]
119innodb_write_io_threads1[1-64]
120interactive_timeout7200[10-86400]
121join_buffer_size262144[128-4294967295]
122key_cache_age_threshold300[100-4294967295]
123key_cache_block_size1024[512-16384]
124key_cache_division_limit100[1-100]
125lc_time_namesen_US[ja_JP|pt_BR|en_US]
126local_infileON[ON|OFF]
127lock_wait_timeout31536000[1-31536000]
128log_bin_use_v1_row_eventsOFF[ON|OFF]
129log_error_verbosity2[1-3]
130log_queries_not_using_indexesOFF[ON|OFF]
131log_slow_admin_statementsOFF[ON|OFF]
132log_throttle_queries_not_using_indexes0[0-4294967295]
133long_query_time1[0.1-31536000]
134loose_thread_pool_enabledON[ON|OFF]
135loose_thread_pool_oversubscribe16[2-128]
136loose_thread_pool_size2[1-64]
137low_priority_updatesOFF[ON|OFF]
138lower_case_table_names1[0|1]
139master_verify_checksumOFF[ON|OFF]
140max_allowed_packet1073741824[16384-1073741824]
141max_binlog_cache_size18446744073709547520[4096-18446744073709547520]
142max_binlog_stmt_cache_size18400000000000000000[4096-18446744073709547520]
143max_connect_errors100[0-4294967295]
144max_connections600[100-100000]
145max_error_count64[0-65535]
146max_execution_time0[0-4294967295]
147max_heap_table_size67108864[16384-1844674407370954752]
148max_join_size18446744073709551615[1-18446744073709551615]
149max_length_for_sort_data1024[0-838860]
150max_points_in_geometry65536[3-1048576]
151max_prepared_stmt_count16382[0-1048576]
152max_seeks_for_key18400000000000000000[1-18446744073709551615]
153max_sort_length1024[4-8388608]
154max_sp_recursion_depth0[0-255]
155max_user_connections0[0|100-100000]
156max_write_lock_count102400[1-102400]
157metadata_locks_cache_size1024[1-1048576]
158min_examined_row_limit0[0-4294967295]
159myisam_sort_buffer_size262144[262144-16777216]
160mysql_native_password_proxy_usersOFF[ON|OFF]
161net_buffer_length16384[1024-1048576]
162net_read_timeout30[1-31536000]
163net_retry_count10[1-4294967295]
164net_write_timeout60[1-31536000]
165ngram_token_size2[1-10]
166open_files_limit1048576[4000-1073741824]
167optimizer_prune_level1[0|1]
168optimizer_search_depth62[0-62]
169optimizer_trace_limit1[0-4294967295]
170optimizer_trace_max_mem_size16384[0-4294967295]
171optimizer_trace_offset-1[-1-4294967295]
172performance_schemaOFF[ON|OFF]
173preload_buffer_size32768[1024-1073741824]
174query_alloc_block_size8192[1024-16384]
175query_cache_limit1048576[1-1048576]
176query_cache_min_res_unit1024[512-18446744073709551608]
177query_cache_size0[0-10485760000]
178query_cache_typeOFF[OFF|ON|DEMAND]
179query_cache_wlock_invalidateOFF[ON|OFF]
180query_prealloc_size8192[8192-1048576]
181range_alloc_block_size4096[4096-18446744073709551615]
182range_optimizer_max_mem_size8388608[0-18446744073709551615]
183read_buffer_size262144[8200-2147479552]
184relay_log_recoveryON[ON|OFF]
185session_track_gtidsOFF[OFF|OWN_GTID|ALL_GTIDS]
186sha256_password_proxy_usersOFF[ON|OFF]
187show_old_temporalsOFF[ON|OFF]
188slave_net_timeout60[1-31536000]
189slave_parallel_typeLOGICAL_CLOCK[DATABASE|LOGICAL_CLOCK]
190slave_type_conversions-[空|ALL_LOSSY|ALL_NON_LOSSY|ALL_LOSSY,ALL_NON_LOSSY|ALL_SIGNED|ALL_UNSIGNED|ALL_SIGNED,ALL_UNSIGNED]
191slow_launch_time2[1-1024]
192slow_query_logON[ON|OFF]
193sort_buffer_size262144[32768-4294967295]
194sql_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]
195sql_safe_updatesOFF[ON|OFF]
196stored_program_cache256[16-524288]
197sync_binlog1[0-4294967295]
198sync_master_info10000[0-4294967295]
199sync_relay_log_info10000[0-4294967295]
200table_definition_cache1024[400-80480]
201table_open_cache512[1-524288]
202table_open_cache_instances2[1-64]
203thread_cache_size1024[0-16384]
204thread_stack1048576[131072-2147483647]
205tls_versionTLSv1,TLSv1.1,TLSv1.2[TLSv1,TLSv1.1,TLSv1.2|TLSv1,TLSv1.1|TLSv1.2]
206tmp_table_size2097152[262144-134217728]
207transaction_alloc_block_size8192[1024-131072]
208transaction_isolationREAD-COMMITTED[READ-UNCOMMITTED|READ-COMMITTED|REPEATABLE-READ|SERIALIZABLE]
209transaction_prealloc_size4096[1024-131072]
210updatable_views_with_limitYES[YES|NO]
211wait_timeout86400[1-31536000]

常见问题

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

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