Specifying Program Options
239
[mysqld-5.0]
new
Beginning with MySQL 5.0.4, it is possible to use
!include
directives in option files to include other
option files and
!includedir
to search specific directories for option files. For example, to include the
/home/mydir/myopt.cnf
file, use the following directive:
!include /home/mydir/myopt.cnf
To search the
/home/mydir
directory and read option files found there, use this directive:
!includedir /home/mydir
There is no guarantee about the order in which the option files in the directory will be read.
Note
Currently, any files to be found and included using the
!includedir
directive
on Unix operating systems must have file names ending in
.cnf
. On Windows,
this directive checks for files with the
.ini
or
.cnf
extension.
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
[group]
line that indicates the program to which the options apply.
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
my.cnf
file contains this line:
!include /home/mydir/myopt.cnf
And suppose that
/home/mydir/myopt.cnf
looks like this:
[mysqladmin]
force
[mysqld]
key_buffer_size=16M
If
my.cnf
is processed by
mysqld
, only the
[mysqld]
group in
/home/mydir/myopt.cnf
is used.
If the file is processed by
mysqladmin
, only the
[mysqladmin]
group is used. If the file is processed
by any other program, no options in
/home/mydir/myopt.cnf
are used.
The
!includedir
directive is processed similarly except that all option files in the named directory
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
[240]
may be used immediately after
--defaults-file
[240]
or
--
defaults-extra-file
[239]
.
• On Windows, if the server is started with the
--defaults-file
[240]
and
--install
[409]
options,
--install
[409]
must be first. See
Section 2.10.4.7, “Starting MySQL as a Windows
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
[239]
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
is the full path name to the file.
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...