暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

mysql Configuration Variables

原创 wzf0072 2023-06-25
234

Configuration Variables

Configurations have a default set of user, system, or initialization variables. You can edit the user and initialization variables, but not the system variables.

  • User Variables: You can edit the user variables when you create or copy a configuration. Some of the user variables are default user variables. You cannot remove these default user variables from the configuration. See User Variables and Default User Variables.
  • System Variables: Oracle defines the system variables according to the shape or requirements of the MySQL instance. You cannot edit the system variables. See System Variables.
  • Initialization Variables: These variables apply for the life span of the MySQL instance of the DB system. While you can edit configurations, and can update the DB systems with new configurations, you cannot change the initialization variables once you apply them. See Initialization Variables.

A configuration variable can be dynamic, which means changing the variable does not require restarting the DB system.

 Note

Once you create a configuration, you cannot edit the variables. To add variables, you must create a new configuration with the desired variable definitions, or copy an existing configuration, edit it accordingly, and edit the DB system to use the new configuration.

User Variables

User variables are those variables that you can edit when you create or copy a configuration. Some of the user variables are default user variables. You cannot remove these default user variables from your configuration.

 Note

  • To view the minimum and maximum values of user variables, see REST API Configuration Variables.
  • The links for the variables lead to their descriptions in the on-premise MySQL Manual; some of the default values shown for MySQL Database Service may be different from those shown in the on-premise MySQL Manual.

Table 10-1 Default Values of User Variables

User VariableDefault Value on MySQL Database Service
autocommitON
big_tablesOFF
binlog_expire_logs_secondsSee Default User Variables.
binlog_row_metadataMINIMAL
binlog_row_value_optionsSee Default User Variables.
binlog_transaction_compressionOFF
character_set_serverUTF8MB4
collation_serverUTF8MB4_0900_AI_CI
completion_typeNO_CHAIN
connect_timeout10
connection_memory_chunk_size8912
connection_memory_limitThere is no default value.
cte_max_recursion_depth1000
default_authentication_plugincaching_sha2_password
foreign_key_checksON
global_connection_memory_limitThere is no default value.
global_connection_memory_trackingfalse
group_concat_max_len1024
group_replication_consistencySee Default User Variables.
information_schema_stats_expiry86400
innodb_buffer_pool_dump_pct25
innodb_buffer_pool_instancesSee Default User Variables.
innodb_buffer_pool_sizeSee Default User Variables.
innodb_ddl_buffer_size1048576
innodb_ddl_threads4
innodb_ft_enable_stopwordON
innodb_ft_max_token_size84
innodb_ft_min_token_size3
innodb_ft_num_word_optimize2000
innodb_ft_result_cache_limitSee Default User Variables.
innodb_ft_server_stopword_tableNULL
innodb_lock_wait_timeout50
innodb_log_writer_threadsON
innodb_max_purge_lag0
innodb_max_purge_lag_delaySee Default User Variables.
innodb_stats_persistent_sample_pages20
innodb_stats_transient_sample_pages8
interactive_timeout28800
local_infileSee Default User Variables.
mandatory_roles See Default User Variables.
max_allowed_packet67108864
max_binlog_cache_sizeSee Default User Variables.
max_connect_errors18446744073709551615
max_connectionsSee Default User Variables.
max_execution_time0
max_heap_table_size16777216
max_prepared_stmt_countThe default value for all shapes is 16382.

The maximum value is dependent on the amount of RAM provided by the shape.

For standalone and high availability shapes, the maximum value is as follows:

  • 8GB shape - Maximum: 16382
  • 15GB shape - Maximum: 20000
  • 16GB shape - Maximum: 20000
  • 30GB shape - Maximum: 40000
  • 32GB shape - Maximum: 40000
  • 60GB shape - Maximum: 80000
  • 64GB shape - Maximum: 80000
  • 120GB shape - Maximum: 160000
  • 128GB shape - Maximum: 160000
  • 240GB shape - Maximum: 160000
  • 256GB shape - Maximum: 160000
  • 384GB shape - Maximum: 160000
  • 512GB shape - Maximum: 160000
  • 768GB shape - Maximum: 160000
  • 1024GB shape - Maximum: 160000

For HeatWave enabled shapes, the maximum value is as follows:

  • 512GB shape - Maximum: 80000
  • 2048GB shape - Maximum: 80000
mysql_firewall_modeON
mysqlx_connect_timeout30
mysqlx_deflate_default_compression_level3
mysqlx_deflate_max_client_compression_level5
mysqlx_interactive_timeout28800
mysqlx_lz4_default_compression_level2
mysqlx_lz4_max_client_compression_level8
mysqlx_max_allowed_packet67108864
mysqlx_read_timeout28800
mysqlx_wait_timeout28800
mysqlx_write_timeout60
mysqlx_zstd_default_compression_level3
mysqlx_zstd_max_client_compression_level11
net_read_timeout30
net_write_timeout60
parser_max_mem_size10000000
regexp_time_limit32
sql_generate_invisible_primary_keyOFF
sort_buffer_size262144
sql_modeERROR_FOR_DIVISION_BY_ZERO, NO_ENGINE_SUBSTITUTION, NO_ZERO_DATE, NO_ZERO_IN_DATE, ONLY_FULL_GROUP_BY, STRICT_TRANS_TABLES
sql_require_primary_keySee Default User Variables.
sql_warningsOFF
thread_pool_dedicated_listenersOFF
thread_pool_max_transactions_limit0
time_zoneSee Default User Variables.
tmp_table_size16777216
transaction_isolationREPEATABLE-READ
wait_timeout28800


「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论