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