The MySQL server has many operating parameters, which you can change at server startup using command-line options or configuration files (option files). MySQL服务器有许多操作参数,您可以在服务器启动时使用命令行选项或配置文件(选项文件)更改这些参数。It is also possible to change many parameters at runtime. 也可以在运行时更改许多参数。For general instructions on setting parameters at startup or runtime, see Section 5.1.7, “Server Command Options”, and Section 5.1.8, “Server System Variables”.有关在启动或运行时设置参数的一般说明,请参阅第5.1.7节,“服务器命令选项”和第5.1.8节,“服务器系统变量”。
On Windows, MySQL Installer interacts with the user and creates a file named 在Windows上,MySQL安装程序与用户交互,并在基本安装目录中创建一个名为my.ini
in the base installation directory as the default option file.my.ini
的文件作为默认选项文件。
On Windows, the 在Windows上,可能不显示.ini
or .cnf
option file extension might not be displayed..ini
或.cnf
选项文件扩展名。
After completing the installation process, you can edit the default option file at any time to modify the parameters used by the server. 完成安装过程后,可以随时编辑默认选项文件以修改服务器使用的参数。For example, to use a parameter setting in the file that is commented with a 例如,要在文件中使用在行首带有#
character at the beginning of the line, remove the #
, and modify the parameter value if necessary. #
字符的参数设置,请删除#
,并根据需要修改参数值。To disable a setting, either add a 要禁用设置,请在行的开头添加#
to the beginning of the line or remove it.#
或将其删除。
For non-Windows platforms, no default option file is created during either the server installation or the data directory initialization process. 对于非Windows平台,在服务器安装或数据目录初始化过程中都不会创建默认选项文件。Create your option file by following the instructions given in Section 4.2.2.2, “Using Option Files”. 按照第4.2.2.2节,“使用选项文件”中给出的说明创建选项文件。Without an option file, the server just starts with its default settings—see Section 5.1.2, “Server Configuration Defaults” on how to check those settings.如果没有选项文件,服务器只会以其默认设置启动。有关如何检查这些设置的信息,请参阅第5.1.2节,“服务器配置默认值”。
For additional information about option file format and syntax, see Section 4.2.2.2, “Using Option Files”.有关选项文件格式和语法的更多信息,请参阅第4.2.2.2节,“使用选项文件”。