Oracle 5.0 Reference Manual page 257

Table of Contents

Advertisement

Typically,
is
DATADIR
a source installation. Note that this is the data directory location that was specified at configuration
time, not the one specified with the
[404]
at runtime has no effect on where the server looks for option files, because it looks for
datadir
them before processing any options.
MySQL looks for option files in the order just described and reads any that exist. If an option file that
you want to use does not exist, create it with a plain text editor.
If multiple instances of a given option are found, the last instance takes precedence. There is one
exception: For mysqld, the first instance of the
to prevent a user specified in an option file from being overridden on the command line.
Note
On Unix platforms, MySQL ignores configuration files that are world-writable.
This is intentional as a security measure.
Any long option that may be given on the command line when running a MySQL program can be given
in an option file as well. To get the list of available options for a program, run it with the
The syntax for specifying options in an option file is similar to command-line syntax (see
Section 4.2.3.1, "Using Options on the Command
the leading two dashes from the option name and you specify only one option per line. For
example,
and
--quick
and
host=localhost
in an option file, write it as loose-opt_name.
loose-opt_name
Empty lines in option files are ignored. Nonempty lines can take any of the following forms:
• #comment,
;comment
Comment lines start with "#" or ";". A "#" comment can start in the middle of a line as well.
[group]
is the name of the program or group for which you want to set options. After a group line, any
group
option-setting lines apply to the named group until the end of the option file or another group line is
given. Option group names are not case sensitive.
opt_name
This is equivalent to
opt_name=value
This is equivalent to
spaces around the "=" character, something that is not true on the command line. You can optionally
enclose the value within single quotation marks or double quotation marks, which is useful if the
value contains a "#" comment character.
Leading and trailing spaces are automatically deleted from option names and values.
You can use the escape sequences "\b", "\t", "\n", "\r", "\\", and "\s" in option values to represent
the backspace, tab, newline, carriage return, backslash, and space characters. The escaping rules in
option files are:
• If a backslash is followed by a valid escape sequence character, the sequence is converted to the
character represented by the sequence. For example, "\s" is converted to a space.
• If a backslash is not followed by a valid escape sequence character, it remains unchanged. For
example, "\S" is retained as is.
Specifying Program Options
/usr/local/mysql/data
--datadir
--host=localhost
on separate lines in an option file. To specify an option of the form
on the command line.
--opt_name
--opt_name=value
237
for a binary installation or
[404]
option when
mysqld
[424]
option is used as a security precaution,
--user
Line"). However, in an option file, you omit
on the command line should be specified as
on the command line. In an option file, you can have
for
/usr/local/var
starts. Use of
--
option.
--help
quick
--

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents