文章目錄
- 一、原英文版本,不帶注釋
- 二、由原版逐字翻譯成的中文版(行行對應)
- 三、最常用的配置
一、原英文版本,不帶注釋
# Other default tuning values
# MySQL Server Instance Configuration File
# ----------------------------------------------------------------------
# Generated by the MySQL Server Instance Configuration Wizard
#
#
# Installation Instructions
# ----------------------------------------------------------------------
#
# On Linux you can copy this file to /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options
# (@localstatedir@ for this installation) or to
# ~/.my.cnf to set user-specific options.
#
# On Windows, when MySQL has been installed using MySQL Installer you
# should keep this file in the ProgramData directory of your server
# (e.g. C:\ProgramData\MySQL\MySQL Server X.Y). To make sure the server
# reads the config file, use the startup option "--defaults-file".
#
# To run the server from the command line, execute this in a
# command line shell, e.g.
# mysqld --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini"
#
# To install the server as a Windows service manually, execute this in a
# command line shell, e.g.
# mysqld --install MySQLXY --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini"
#
# And then execute this in a command line shell to start the server, e.g.
# net start MySQLXY
#
#
# Guidelines for editing this file
# ----------------------------------------------------------------------
#
# In this file, you can use all long options that the program supports.
# If you want to know the options a program supports, start the program
# with the "--help" option.
#
# More detailed information about the individual options can also be
# found in the manual.
#
# For advice on how to change settings please see
# https://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html
#
#
# CLIENT SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by MySQL client applications.
# Note that only client applications shipped by MySQL are guaranteed
# to read this section. If you want your own MySQL client program to
# honor these values, you need to specify it as an option during the
# MySQL client library initialization.
#
[client]# pipe=# socket=MYSQLport=3306[mysql]
no-beep# default-character-set=# SERVER SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by the MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this
# file.
#
# server_type=3
[mysqld]# The next three options are mutually exclusive to SERVER_PORT below.
# skip-networking
# enable-named-pipe
# shared-memory# shared-memory-base-name=MYSQL# The Pipe the MySQL Server will use.
# socket=MYSQL# The access control granted to clients on the named pipe created by the MySQL Server.
# named-pipe-full-access-group=# The TCP/IP Port the MySQL Server will listen on
port=3306# Path to installation directory. All paths are usually resolved relative to this.
# basedir="C:/Program Files/MySQL/MySQL Server 8.0/"# Path to the database root
datadir=C:/ProgramData/MySQL/MySQL Server 8.0\Data# The default character set that will be used when a new schema or table is
# created and no character set is defined
# character-set-server=# Administers multifactor authentication (MFA) capabilities. It applies to the authentication
# factor-related clauses of CREATE USER and ALTER USER statements used to manage MySQL account
# definitions, where “factor” corresponds to an authentication method or plugin associated
# with an account.
authentication_policy=*,,# The default storage engine that will be used when create new tables when
default-storage-engine=INNODB# The current server SQL mode, which can be set dynamically.
# Modes affect the SQL syntax MySQL supports and the data validation checks it performs. This
# makes it easier to use MySQL in different environments and to use MySQL together with other
# database servers.
sql-mode="ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"# General and Slow logging.
log-output=FILEgeneral-log=0general_log_file="DESKTOP-F30O1GF.log"slow-query-log=1slow_query_log_file="DESKTOP-F30O1GF-slow.log"long_query_time=10# Error Logging.
log-error="DESKTOP-F30O1GF.err"# ***** Group Replication Related *****
# Specifies the base name to use for binary log files. With binary logging
# enabled, the server logs all statements that change data to the binary
# log, which is used for backup and replication.
log-bin="DESKTOP-F30O1GF-bin"# ***** Group Replication Related *****
# Specifies the server ID. For servers that are used in a replication topology,
# you must specify a unique server ID for each replication server, in the
# range from 1 to 2^32 ? 1. “Unique” means that each ID must be different
# from every other ID in use by any other source or replica.
server-id=1# Indicates how table and database names are stored on disk and used in MySQL.
# Value 0 = Table and database names are stored on disk using the lettercase specified in the CREATE
# TABLE or CREATE DATABASE statement. Name comparisons are case-sensitive. You should not
# set this variable to 0 if you are running MySQL on a system that has case-insensitive file
# names (such as Windows or macOS). If you force this variable to 0 with
# --lower-case-table-names=0 on a case-insensitive file system and access MyISAM tablenames
# using different lettercases, index corruption may result.
# Value 1 = Table names are stored in lowercase on disk and name comparisons are not case-sensitive.
# MySQL converts all table names to lowercase on storage and lookup. This behavior also applies
# to database names and table aliases.
# Value 2 = Table and database names are stored on disk using the lettercase specified in the CREATE TABLE
# or CREATE DATABASE statement, but MySQL converts them to lowercase on lookup. Name comparisons
# are not case-sensitive. This works only on file systems that are not case-sensitive! InnoDB
# table names and view names are stored in lowercase, as for lower_case_table_names=1.
lower_case_table_names=1# This variable is used to limit the effect of data import and export operations, such as
# those performed by the LOAD DATA and SELECT ... INTO OUTFILE statements and the
# LOAD_FILE() function. These operations are permitted only to users who have the FILE privilege.
secure-file-priv="C:/ProgramData/MySQL/MySQL Server 8.0/Uploads"# The maximum amount of concurrent sessions the MySQL server will
# allow. One of these connections will be reserved for a user with
# SUPER privileges to allow the administrator to login even if the
# connection limit has been reached.
max_connections=151# The number of open tables for all threads. Increasing this value increases the number
# of file descriptors that mysqld requires.
table_open_cache=4000# Defines the maximum amount of memory that can be occupied by the TempTable
# storage engine before it starts storing data on disk.
temptable_max_ram=1G# Defines the maximum size of internal in-memory temporary tables created
# by the MEMORY storage engine and, as of MySQL 8.0.28, the TempTable storage
# engine. If an internal in-memory temporary table exceeds this size, it is
# automatically converted to an on-disk internal temporary table.
tmp_table_size=71M# The storage engine for in-memory internal temporary tables (see Section 8.4.4, “Internal
# Temporary Table Use in MySQL”). Permitted values are TempTable (the default) and MEMORY.
internal_tmp_mem_storage_engine=TempTable#*** MyISAM Specific options
# The maximum size of the temporary file that MySQL is permitted to use while re-creating a
# MyISAM index (during REPAIR TABLE, ALTER TABLE, or LOAD DATA). If the file size would be
# larger than this value, the index is created using the key cache instead, which is slower.
# The value is given in bytes.
myisam_max_sort_file_size=2146435072# The size of the buffer that is allocated when sorting MyISAM indexes during a REPAIR TABLE
# or when creating indexes with CREATE INDEX or ALTER TABLE.
myisam_sort_buffer_size=133M# Size of the Key Buffer, used to cache index blocks for MyISAM tables.
# Do not set it larger than 30% of your available memory, as some memory
# is also required by the OS to cache rows. Even if you're not using
# MyISAM tables, you should still set it to 8-64M as it will also be
# used for internal temporary disk tables.
key_buffer_size=8M# Each thread that does a sequential scan for a MyISAM table allocates a buffer
# of this size (in bytes) for each table it scans. If you do many sequential
# scans, you might want to increase this value, which defaults to 131072. The
# value of this variable should be a multiple of 4KB. If it is set to a value
# that is not a multiple of 4KB, its value is rounded down to the nearest multiple
# of 4KB.
read_buffer_size=128K# This variable is used for reads from MyISAM tables, and, for any storage engine,
# for Multi-Range Read optimization.
read_rnd_buffer_size=256K#*** INNODB Specific options ***
# innodb_data_home_dir=# Use this option if you have a MySQL server with InnoDB support enabled
# but you do not plan to use it. This will save memory and disk space
# and speed up some things.
# skip-innodb# If set to 1, InnoDB will flush (fsync) the transaction logs to the
# disk at each commit, which offers full ACID behavior. If you are
# willing to compromise this safety, and you are running small
# transactions, you may set this to 0 or 2 to reduce disk I/O to the
# logs. Value 0 means that the log is only written to the log file and
# the log file flushed to disk approximately once per second. Value 2
# means the log is written to the log file at each commit, but the log
# file is only flushed to disk approximately once per second.
innodb_flush_log_at_trx_commit=1# The size in bytes of the buffer that InnoDB uses to write to the log files on
# disk. The default value changed from 8MB to 16MB with the introduction of 32KB
# and 64KB innodb_page_size values. A large log buffer enables large transactions
# to run without the need to write the log to disk before the transactions commit.
# Thus, if you have transactions that update, insert, or delete many rows, making
# the log buffer larger saves disk I/O.
innodb_log_buffer_size=16M# The size in bytes of the buffer pool, the memory area where InnoDB caches table
# and index data. The default value is 134217728 bytes (128MB). The maximum value
# depends on the CPU architecture; the maximum is 4294967295 (232-1) on 32-bit systems
# and 18446744073709551615 (264-1) on 64-bit systems. On 32-bit systems, the CPU
# architecture and operating system may impose a lower practical maximum size than the
# stated maximum. When the size of the buffer pool is greater than 1GB, setting
# innodb_buffer_pool_instances to a value greater than 1 can improve the scalability on
# a busy server.
innodb_buffer_pool_size=128M# Defines the amount of disk space occupied by redo log files. This variable supersedes the
# innodb_log_files_in_group and innodb_log_file_size variables.
innodb_redo_log_capacity=100M# Defines the maximum number of threads permitted inside of InnoDB. A value
# of 0 (the default) is interpreted as infinite concurrency (no limit). This
# variable is intended for performance tuning on high concurrency systems.
# InnoDB tries to keep the number of threads inside InnoDB less than or equal to
# the innodb_thread_concurrency limit. Once the limit is reached, additional threads
# are placed into a “First In, First Out” (FIFO) queue for waiting threads. Threads
# waiting for locks are not counted in the number of concurrently executing threads.
innodb_thread_concurrency=17# The increment size (in MB) for extending the size of an auto-extend InnoDB system tablespace file when it becomes full.
innodb_autoextend_increment=64# The number of regions that the InnoDB buffer pool is divided into.
# For systems with buffer pools in the multi-gigabyte range, dividing the buffer pool into separate instances can improve concurrency,
# by reducing contention as different threads read and write to cached pages.
innodb_buffer_pool_instances=8# Determines the number of threads that can enter InnoDB concurrently.
innodb_concurrency_tickets=5000# Specifies how long in milliseconds (ms) a block inserted into the old sublist must stay there after its first access before
# it can be moved to the new sublist.
innodb_old_blocks_time=1000# When this variable is enabled, InnoDB updates statistics during metadata statements.
innodb_stats_on_metadata=0# When innodb_file_per_table is enabled (the default in 5.6.6 and higher), InnoDB stores the data and indexes for each newly created table
# in a separate .ibd file, rather than in the system tablespace.
innodb_file_per_table=1# Use the following list of values: 0 for crc32, 1 for strict_crc32, 2 for innodb, 3 for strict_innodb, 4 for none, 5 for strict_none.
innodb_checksum_algorithm=0# If this is set to a nonzero value, all tables are closed every flush_time seconds to free up resources and
# synchronize unflushed data to disk.
# This option is best used only on systems with minimal resources.
flush_time=0# The minimum size of the buffer that is used for plain index scans, range index scans, and joins that do not use
# indexes and thus perform full table scans.
join_buffer_size=256K# The maximum size of one packet or any generated or intermediate string, or any parameter sent by the
# mysql_stmt_send_long_data() C API function.
max_allowed_packet=64M# If more than this many successive connection requests from a host are interrupted without a successful connection,
# the server blocks that host from performing further connections.
max_connect_errors=100# The number of file descriptors available to mysqld from the operating system
# Try increasing the value of this option if mysqld gives the error "Too many open files".
open_files_limit=8161# If you see many sort_merge_passes per second in SHOW GLOBAL STATUS output, you can consider increasing the
# sort_buffer_size value to speed up ORDER BY or GROUP BY operations that cannot be improved with query optimization
# or improved indexing.
sort_buffer_size=256K# Specify the maximum size of a row-based binary log event, in bytes.
# Rows are grouped into events smaller than this size if possible. The value should be a multiple of 256.
binlog_row_event_max_size=8K# If the value of this variable is greater than 0, a replica synchronizes its master.info file to disk.
# (using fdatasync()) after every sync_source_info events.
sync_source_info=10000# If the value of this variable is greater than 0, the MySQL server synchronizes its relay log to disk.
# (using fdatasync()) after every sync_relay_log writes to the relay log.
sync_relay_log=10000# If the value of this variable is greater than 0, a replica synchronizes its relay-log.info file to disk.
# (using fdatasync()) after every sync_relay_log_info transactions.
sync_relay_log_info=10000# Load mysql plugins at start."plugin_x ; plugin_y".
# plugin_load# The TCP/IP Port the MySQL Server X Protocol will listen on.
loose_mysqlx_port=33060
二、由原版逐字翻譯成的中文版(行行對應)
# 其他默認調整值
# MySQL Server實例配置文件
# ----------------------------------------------------------------------
# 由MySQL Server實例配置向導生成
#
#
# 安裝說明
# ----------------------------------------------------------------------
#
# 在Linux上,您可以將此文件復制到/etc/my.cnf以設置全局選項,
# mysql-data-dir/my.cnf設置服務器特定選項
# (用于此安裝的@localstatedir@)或
# ~/.my.cnf設置特定于用戶的選項。
#
# 在Windows上,當使用MySQL安裝程序安裝MySQL時
# 應該將此文件保存在服務器的ProgramData目錄中
# (例如C:\ProgramData\MySQL\MySQL-Server X.Y)。為了確保服務器
# 讀取配置文件,使用啟動選項“--defaults file”。
#
# 要從命令行運行服務器,請在
# 命令行shell,例如。
# mysqld --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini"
#
# 若要手動將服務器作為Windows服務安裝,請在
# 命令行shell,例如。
# mysqld --install MySQLXY --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini"
#
# 然后在命令行shell中執行此操作以啟動服務器,例如。
# net啟動MySQLXY
#
#
# 編輯此文件的準則
# ----------------------------------------------------------------------
#
# 在此文件中,您可以使用程序支持的所有長選項。
# 如果您想知道程序支持的選項,請啟動該程序
# 使用“--help”選項。
#
# 有關各個選項的更詳細信息也可以
# 在手冊中找到。
#
# 有關如何更改設置的建議,請參閱
# https://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html
#
#
# 客戶塊
# ----------------------------------------------------------------------
#
# MySQL客戶端應用程序將讀取以下選項。
# 請注意,只有MySQL提供的客戶端應用程序才有保證
# 閱讀本節。如果您希望自己的MySQL客戶端程序
# 遵守這些值,您需要在
# MySQL客戶端庫初始化。
#
[client]# pipe=# socket=MYSQLport=3306[mysql]
no-beep# default-character-set=# 服務器部分
# ----------------------------------------------------------------------
#
# MySQL Server將讀取以下選項。確保
# 您已經正確安裝了服務器(請參閱上文),因此它會讀取以下內容
# 文件。
#
# server_type=3
[mysqld]# 以下三個選項對SERVER_PORT來說是互斥的。
# skip-networking
# enable-named-pipe
# shared-memory# shared-memory-base-name=MYSQL# MySQL服務器將使用的管道。
# socket=MYSQL# 在MySQL Server創建的命名管道上授予客戶端的訪問控制。
# named-pipe-full-access-group=# MySQL服務器將偵聽的TCP/IP端口
port=3306# 安裝目錄的路徑。所有路徑通常都相對于此進行解析。
# basedir="C:/Program Files/MySQL/MySQL Server 8.0/"# 數據庫根目錄的路徑
datadir=C:/ProgramData/MySQL/MySQL Server 8.0\Data# 當新架構或表
# 已創建,但未定義字符集
# character-set-server=# 管理多因素身份驗證(MFA)功能。它適用于身份驗證
# 用于管理MySQL帳戶的CREATE USER和ALTER USER語句的因子相關子句
# 定義,其中“factor”對應于關聯的身份驗證方法或插件
# 有賬戶。
authentication_policy=*,,# 在以下情況下創建新表時將使用的默認存儲引擎
default-storage-engine=INNODB# 當前服務器SQL模式,可以動態設置。
# 模式會影響MySQL支持的SQL語法及其執行的數據驗證檢查。這
# 使MySQL更容易在不同的環境中使用,并更容易與其他環境一起使用
# 數據庫服務器。
sql-mode="ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"# 常規和慢速日志記錄。
log-output=FILEgeneral-log=0general_log_file="DESKTOP-F30O1GF.log"slow-query-log=1slow_query_log_file="DESKTOP-F30O1GF-slow.log"long_query_time=10# 錯誤日志記錄。
log-error="DESKTOP-F30O1GF.err"# ***** 與組復制相關 *****
# 指定要用于二進制日志文件的基本名稱。使用二進制日志記錄
# 啟用后,服務器會記錄所有將數據更改為二進制的語句
# 日志,用于備份和復制。
log-bin="DESKTOP-F30O1GF-bin"# ***** 與組復制相關 *****
# 指定服務器ID。對于復制拓撲中使用的服務器,
# 必須在中為每個復制服務器指定一個唯一的服務器ID
# 范圍從1到2^32?1。“唯一”表示每個ID必須不同
# 來自任何其他源或復制副本正在使用的每個其他ID。
server-id=1# 指示表和數據庫名稱如何存儲在磁盤上并在MySQL中使用。
# Value 0 = 表和數據庫名稱使用CREATE中指定的字母大小寫存儲在磁盤上
# TABLE或CREATE DATABASE語句。名稱比較區分大小寫。你不應該
# 如果您在具有不區分大小寫文件的系統上運行MySQL,請將該變量設置為0
# 名稱(如Windows或macOS)。如果使用強制此變量為0
# --在不區分大小寫的文件系統上,小寫表名=0,并訪問MyISAM表名
# 使用不同的信紙,可能會導致索引損壞。
# Value 1 = 表名以小寫形式存儲在磁盤上,名稱比較不區分大小寫。
# MySQL在存儲和查找時將所有表名轉換為小寫。此行為也適用
# 到數據庫名稱和表別名。
# Value 2 = 表和數據庫名稱使用CREATE Table中指定的字母大小寫存儲在磁盤上
# 或CREATE DATABASE語句,但MySQL在查找時會將它們轉換為小寫。名稱比較
# 不區分大小寫。這只適用于不區分大小寫的文件系統!創新數據庫
# 表名和視圖名以小寫形式存儲,例如lower_case_table_names=1。
lower_case_table_names=1# 此變量用于限制數據導入和導出操作的效果,例如
# 由LOAD DATA和SELECT…執行。。。INTO OUTFILE語句和
# LOAD_FILE()函數。這些操作僅允許具有FILE權限的用戶執行。
secure-file-priv="C:/ProgramData/MySQL/MySQL Server 8.0/Uploads"# MySQL服務器將執行的最大并發會話數
# 允許其中一個連接將保留給具有
# 允許管理員登錄的超級權限,即使
# 已達到連接限制。
max_connections=151# 所有線程打開的表數。增加該值會增加數字
# mysqld所需的文件描述符的數量。
table_open_cache=4000# 定義TempTable可以占用的最大內存量
# 存儲引擎在開始將數據存儲在磁盤上之前。
temptable_max_ram=1G# 定義創建的內部內存臨時表的最大大小
# 通過MEMORY存儲引擎,以及從MySQL 8.0.28起的TempTable存儲
# 發動機如果內存中的內部臨時表超過此大小,則為
# 自動轉換為磁盤上的內部臨時表。
tmp_table_size=71M# 內存內部臨時表的存儲引擎(參見第8.4.4節“內部
# MySQL中的臨時表使用”)。允許的值為TempTable(默認值)和MEMORY。
internal_tmp_mem_storage_engine=TempTable#*** MyISAM特定選項
# MySQL在重新創建時允許使用的臨時文件的最大大小
# MyISAM索引(在REPAIR TABLE、ALTER TABLE或LOAD DATA期間)。如果文件大小為
# 如果大于該值,則使用鍵緩存來創建索引,這會比較慢。
# 該值以字節為單位。
myisam_max_sort_file_size=2146435072# 在REPAIR TABLE期間對MyISAM索引進行排序時分配的緩沖區大小
# 或者使用CREATE INDEX或ALTER TABLE創建索引時。
myisam_sort_buffer_size=133M# 密鑰緩沖區的大小,用于緩存MyISAM表的索引塊。
# 不要將其設置為大于可用內存的30%,作為某些內存
# 也是OS緩存行所需要的。即使你不使用
# MyISAM表,您仍然應該將其設置為8-64M,因為它也將是
# 用于內部臨時磁盤表。
key_buffer_size=8M# 對MyISAM表進行順序掃描的每個線程都會分配一個緩沖區
# 它掃描的每個表的大小(以字節為單位)。如果你做許多連續的
# 掃描時,您可能希望增加此值,默認值為131072。這個
# 這個變量的值應該是4KB的倍數。如果設置為某個值
# 不是4KB的倍數,其值四舍五入到最接近的倍數
# 高達4KB。
read_buffer_size=128K# 此變量用于從MyISAM表中讀取,對于任何存儲引擎,
# 用于多范圍讀取優化。
read_rnd_buffer_size=256K#*** INNODB特定選項 ***
# innodb_data_home_dir=# 如果您的MySQL服務器已啟用InnoDB支持,請使用此選項
# 但您不打算使用它。這將節省內存和磁盤空間
# 并且加快一些事情。
# skip-innodb# 如果設置為1,InnoDB將把事務日志刷新(fsync)到
# 磁盤,這提供了完整的ACID行為。如果你是
# 愿意在安全問題上妥協,而你卻跑得很小
# 事務,您可以將其設置為0或2以將磁盤I/O減少到
# 日志。值0表示日志僅寫入日志文件,并且
# 日志文件大約每秒刷新一次。值2
# 意味著每次提交時都會將日志寫入日志文件,但日志
# 文件大約每秒只將文件刷新到磁盤一次。
innodb_flush_log_at_trx_commit=1# InnoDB用于寫入日志文件的緩沖區的大小(以字節為單位)
# 磁盤隨著32KB的引入,默認值從8MB更改為16MB
# 和64KB的innodb_ page_ size值。大型日志緩沖區可實現大型事務
# 在事務提交之前無需將日志寫入磁盤即可運行。
# 因此,如果您有更新、插入或刪除許多行的事務
# 日志緩沖區越大,節省磁盤I/O。
innodb_log_buffer_size=16M# 緩沖池的大小(以字節為單位),InnoDB緩存表的內存區域
# 以及索引數據。默認值為134217728字節(128MB)。最大值
# 取決于CPU架構;在32位系統上,最大值為4294967295(232-1)
# 以及在64位系統上的18446744073709551615(264-1)。在32位系統上,CPU
# 體系結構和操作系統可以施加比
# 規定的最大值。當緩沖池的大小大于1GB時,設置
# innodb_buffer_pool_instances的值大于1可以提高上的可伸縮性
# 繁忙的服務器。
innodb_buffer_pool_size=128M# 定義重做日志文件所占用的磁盤空間量。此變量取代
# innodb_log_files_i_group和innodb_og_file_size變量。
innodb_redo_log_capacity=100M# 定義InnoDB內部允許的最大線程數。A值
# 0的(默認值)被解釋為無限并發(無限制)。這
# 變量用于高并發系統上的性能調優。
# InnoDB試圖保持InnoDB內部的線程數小于或等于
# innodb_thread_concurrency限制。一旦達到極限,就會有額外的線程
# 被放入等待線程的“先進先出”(FIFO)隊列中。線程
# 等待鎖不計入并發執行的線程數。
innodb_thread_concurrency=17# 當自動擴展InnoDB系統表空間文件變滿時,用于擴展其大小的增量大小(MB)。
innodb_autoextend_increment=64# InnoDB緩沖池被劃分為的區域數。
# 對于緩沖池在千兆字節范圍內的系統,將緩沖池劃分為單獨的實例可以提高并發性,
# 通過減少不同線程讀取和寫入緩存頁面時的爭用。
innodb_buffer_pool_instances=8# 確定可以同時進入InnoDB的線程數。
innodb_concurrency_tickets=5000# 指定插入到舊子列表中的塊在其第一次訪問之后必須停留在那里的時間(以毫秒為單位)
# 可以將其移動到新的子列表中。
innodb_old_blocks_time=1000# 當啟用該變量時,InnoDB會在元數據語句期間更新統計信息。
innodb_stats_on_metadata=0# 當innodb_file_per_table被啟用時(5.6.6及更高版本中的默認值),innodb存儲每個新創建的表的數據和索引
# 在一個單獨的.ibd文件中,而不是在系統表空間中。
innodb_file_per_table=1# 使用以下值列表:0表示crc32,1表示strict_crc32,2表示innodb,3表示strict_innodb,4表示none,5表示strict_none。
innodb_checksum_algorithm=0# 如果將其設置為非零值,則每flush_time秒關閉所有表以釋放資源和
# 將未刷新的數據同步到磁盤。
# 此選項最好僅用于資源最少的系統。
flush_time=0# 用于普通索引掃描、范圍索引掃描和不使用的聯接的緩沖區的最小大小
# 索引,從而執行全表掃描。
join_buffer_size=256K# 一個數據包或任何生成或中間字符串的最大大小,或由
# mysql_stmt_send_long_data()C API函數。
max_allowed_packet=64M# 如果在沒有成功連接的情況下中斷了來自主機的超過這個數量的連續連接請求,
# 服務器阻止該主機執行進一步的連接。
max_connect_errors=100# 操作系統中可用于mysqld的文件描述符數
# 如果mysqld給出錯誤“打開的文件太多”,請嘗試增加此選項的值。
open_files_limit=8161# 如果在SHOW GLOBAL STATUS輸出中每秒看到許多sort_merge_passes,可以考慮增加
# sort_buffer_size值以加快查詢優化無法改進的ORDER BY或GROUP BY操作
# 或改進的索引。
sort_buffer_size=256K# 指定基于行的二進制日志事件的最大大小(以字節為單位)。
# 如果可能,行被分組為小于此大小的事件。該值應該是256的倍數。
binlog_row_event_max_size=8K# 如果此變量的值大于0,則副本會將其master.info文件同步到磁盤。
# (using fdatasync()) after every sync_source_info events.
sync_source_info=10000# 如果此變量的值大于0,MySQL服務器會將其中繼日志同步到磁盤。
# (using fdatasync()) after every sync_relay_log writes to the relay log.
sync_relay_log=10000# 如果此變量的值大于0,則復制副本會將其relay-log.info文件同步到磁盤。
# (using fdatasync()) after every sync_relay_log_info transactions.
sync_relay_log_info=10000# 一開始就加載mysql插件。“插入_x;插入_y”。
# plugin_load# MySQL Server X協議將偵聽的TCP/IP端口。
loose_mysqlx_port=33060