Oracle 5.0 Reference Manual page 259

Table of Contents

Advertisement

[mysqld-5.0]
new
Beginning with MySQL 5.0.4, it is possible to use
option files and
/home/mydir/myopt.cnf
!include /home/mydir/myopt.cnf
To search the
!includedir /home/mydir
There is no guarantee about the order in which the option files in the directory will be read.
Write the contents of an included option file like any other option file. That is, it should contain groups of
options, each preceded by a
While an included file is being processed, only those options in groups that the current program is
looking for are used. Other groups are ignored. Suppose that a
!include /home/mydir/myopt.cnf
And suppose that
[mysqladmin]
force
[mysqld]
key_buffer_size=16M
If
is processed by mysqld, only the
my.cnf
If the file is processed by mysqladmin, only the
by any other program, no options in
The
!includedir
are read.
4.2.3.4. Command-Line Options that Affect Option-File Handling
Most MySQL programs that support option files handle the following options. They affect option-file
handling, so they must be given on the command line and not in an option file. To work properly, each
of these options must be given before other options, with these exceptions:
--print-defaults
defaults-extra-file
• On Windows, if the server is started with the
options,
--install
Service".
When specifying file names, you should avoid the use of the "~" shell metacharacter because it might
not be interpreted as you expect.
--defaults-extra-file=file_name
Read this option file after the global option file but (on Unix) before the user option file. As of
MySQL 5.0.6, if the file does not exist or is otherwise inaccessible, the program exits with an error.
file_name
Specifying Program Options
to search specific directories for option files. For example, to include the
!includedir
file, use the following directive:
directory and read option files found there, use this directive:
/home/mydir
Note
Currently, any files to be found and included using the
on Unix operating systems must have file names ending in .cnf. On Windows,
this directive checks for files with the
[group]
/home/mydir/myopt.cnf
/home/mydir/myopt.cnf
directive is processed similarly except that all option files in the named directory
[240]
may be used immediately after
[239].
[409]
must be first. See
is the full path name to the file.
directives in option files to include other
!include
.ini
line that indicates the program to which the options apply.
looks like this:
group in
[mysqld]
[mysqladmin]
--defaults-file
--defaults-file
Section 2.10.4.7, "Starting MySQL as a Windows
[239]
239
!includedir
or
extension.
.cnf
file contains this line:
my.cnf
/home/mydir/myopt.cnf
group is used. If the file is processed
are used.
[240]
[240]
and
--install
directive
is used.
or
--
[409]

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents