Some options are “boolean” and control behavior that can be turned on or off. 一些选项是“布尔”的,可以打开或关闭控制行为。For example, the mysql client supports a 例如,mysql客户端支持--column-names
option that determines whether or not to display a row of column names at the beginning of query results. --column-names
选项,该选项决定是否在查询结果的开头显示一行列名。By default, this option is enabled. However, you may want to disable it in some instances, such as when sending the output of mysql into another program that expects to see only data and not an initial header line.默认情况下,此选项处于启用状态。但是,在某些情况下,您可能希望禁用它,例如当将mysql的输出发送到另一个只希望看到数据而不希望看到初始标题行的程序时。
To disable column names, you can specify the option using any of these forms:要禁用列名,您可以使用以下任何形式指定选项:
--disable-column-names --skip-column-names --column-names=0
The --disable
and --skip
prefixes and the =0
suffix all have the same effect: They turn the option off.--disable
和--skip
前缀以及=0
后缀都具有相同的效果:它们关闭了该选项。
The “enabled” form of the option may be specified in any of these ways:选项的“启用”形式可以通过以下任何一种方式指定:
--column-names --enable-column-names --column-names=1
The values 布尔选项也可以识别ON
, TRUE
, OFF
, and FALSE
are also recognized for boolean options (not case-sensitive).ON
、TRUE
、OFF
和FALSE
值(不区分大小写)。
If an option is prefixed by 如果一个选项的前缀是--loose
, a program does not exit with an error if it does not recognize the option, but instead issues only a warning:--loose
,如果程序无法识别该选项,它不会退出并出错,而是只发出警告:
shell> mysql --loose-no-such-option
mysql: WARNING: unknown option '--loose-no-such-option'
The 当您在同一台机器上运行多个MySQL安装的程序并在选项文件中列出选项时,--loose
prefix can be useful when you run programs from multiple installations of MySQL on the same machine and list options in an option file. --loose
前缀可能很有用。An option that may not be recognized by all versions of a program can be given using the 可以使用--loose
prefix (or loose
in an option file). --loose
前缀(或选项文件中的loose
)给出可能无法被程序所有版本识别的选项。Versions of the program that recognize the option process it normally, and versions that do not recognize it issue a warning and ignore it.识别该选项的程序版本会正常处理它,而不识别它的版本会发出警告并忽略它。
The --maximum
prefix is available for mysqld only and permits a limit to be placed on how large client programs can set session system variables. --maximum
前缀仅适用于mysqld,并允许对大型客户端程序设置会话系统变量的数量进行限制。To do this, use a 为此,请在变量名前使用--maximum
prefix with the variable name. For example, --maximum-max_heap_table_size=32M
prevents any client from making the heap table size limit larger than 32M.--maximum
前缀。例如,--maximum-max_heap_table_size=32M
可防止任何客户端使堆表大小限制大于32M。
The --maximum
prefix is intended for use with system variables that have a session value. If applied to a system variable that has only a global value, an error occurs. --maximum
前缀用于具有会话值的系统变量。如果应用于只有全局值的系统变量,则会发生错误。For example, with 例如,当--maximum-back_log=200
, the server produces this error:--maximum-back_log=200
时,服务器会产生以下错误:
Maximum value of 'back_log' cannot be set