定制MySQL Database on Azure服务器参数

MySQL 数据库 on Azure支持您对服务器部分参数进行自定义设置,下表中列出可配置的参数,默认值,以及可选范围。

了解更多MySQL参数信息

参数 默认值 范围
binlog_group_commit_sync_delay(仅限5.7) 1000 [0 - 0; 11 - 1000000]
binlog_group_commit_sync_no_delay_count(仅限5.7) 0 [0 - 1000000]
character_set_server <默认为DB创建时的设置> [utf8|utf16|utf32|utf8mb4|ujis|ucs2|tis620|swe7|sjis|macroman|macce|latin1|latin2|latin5|latin7|koi8r|koi8u|keybcs2|hp8|hebrew|greek|geostd8|gbk|gb2312|euckr|eucjpms|dec8|cp850|cp852|cp866|cp932|cp1250|cp1251|cp1256|cp1257|binary|big5|ascii|armscii8]
div_precision_increment 4 [0 - 30]
eq_range_index_dive_limit 10 [0 - 4294967295]
event_scheduler OFF [ON|OFF|DISABLED]
group_concat_max_len 1024 [4-16777216]
innodb_additional_mem_pool_size(仅限5.6) 8388608 [2097152 - 52428800]
innodb_adaptive_hash_index ON [ON|OFF]
innodb_lock_wait_timeout 50 [1-3600]
innodb_old_blocks_pct 37 [5 - 95]
innodb_old_blocks_time 1000 [0 - 4294967295]
innodb_online_alter_log_max_size 134217728 [65536 - 2147483648]
innodb_read_ahead_threshold 56 [0 - 64]
innodb_thread_sleep_delay 10000 [0 - 1000000]
interactive_timeout 1800 [10-1800]
log_bin_trust_function_creators OFF [ON|OFF|FALSE]
log_queries_not_using_indexes OFF [ON|OFF]
long_query_time 10 [1 - 1E+100]
max_allowed_packet 1048576 [1024 - 16777216]
max_connect_errors 100 [1 - 18446744073709551615]
max_length_for_sort_data 1024 [4 - 8388608]
server_id <随机值> [1000-4294967295]
slave_net_timeout 60 [30 - 3600]
slow_query_log OFF [ON|OFF]
sql_mode <默认为空> [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] 请参考Server SQL Modes.
table_open_cache 64 [1 - 4000]
time_zone SYSTEM [SYSTEM
tx_isolation REPEATABLE-READ [READ-UNCOMMITTED|READ-COMMITTED|REPEATABLE-READ|SERIALIZABLE]
wait_timeout 120 [60-240]

备注

考虑到流量管理器的限制,我们将wait_timeout的默认值调整为120s,可选范围为60-240s,但上述调整只对10月后创建的实例生效。对于以前的实例,请您手动将wait_timeout值设置为60-240s之间的任意数值,推荐120s。

备注

关于时区的配置,可详细参考MySQL on Azure上的时区配置.