Specifying Program Options
235
| NOW() |
+---------------------+
| 2006-01-05 21:19:04 |
+---------------------+
The
--execute
or
-e
option may also be used to pass commands in an analogous fashion to the
ndb_mgm
management client for MySQL Cluster. See
Section 17.2.5, “Safe Shutdown and Restart of
MySQL Cluster”
, for an example.
4.2.3.2. Program Option Modifiers
Some options are “boolean” and control behavior that can be turned on or off. For example, the
mysql
client supports a
--column-names
[266]
option that determines whether or not to display a row of
column names at the beginning of query results. 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.
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.
The “enabled” form of the option may be specified in any of these ways:
--column-names
--enable-column-names
--column-names=1
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:
shell>
mysql --loose-no-such-option
mysql: WARNING: unknown option '--no-such-option'
The
--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, 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). Versions of the program
that recognize the option process it normally, and versions that do not recognize it issue a warning and
ignore it.
mysqld
enables a limit to be placed on how large client programs can set dynamic system
variables. To do this, use a
--maximum
prefix with the variable name. For example,
--maximum-
query_cache_size=4M
prevents any client from making the query cache size larger than 4MB.
4.2.3.3. Using Option Files
Most MySQL programs can read startup options from option files (also sometimes called configuration
files). Option files provide a convenient way to specify commonly used options so that they need not be
entered on the command line each time you run a program. For the MySQL server, MySQL provides a
number of
preconfigured option files
.
To determine whether a program reads option files, invoke it with the
--help
option. (For
mysqld
, use
--verbose
[425]
and
--help
[400]
.) If the program reads option files, the help message indicates
which files it looks for and which option groups it recognizes.
Note
Option files used with MySQL Cluster programs are covered in
Section 17.3,
“MySQL Cluster Configuration”
.
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...