Specifying Program Options
236
On Windows, MySQL programs read startup options from the following files, in the specified order (top
items are used first).
File Name
Purpose
%WINDIR%\my.ini
,
%WINDIR%\my.cnf
Global options
C:\my.ini
,
C:\my.cnf
Global options
INSTALLDIR\my.ini
,
INSTALLDIR\my.cnf
Global options
defaults-extra-file
The file specified with
--defaults-extra-file=path
[239]
, if
any
%WINDIR%
represents the location of your Windows directory. This is commonly
C:\WINDOWS
. You
can determine its exact location from the value of the
WINDIR
environment variable using the following
command:
C:\>
echo %WINDIR%
INSTALLDIR
represents the MySQL installation directory. This is typically
C:\PROGRAMDIR\MySQL
\MySQL 5.0 Server
where
PROGRAMDIR
represents the programs directory (usually
Program
Files
on English-language versions of Windows), when MySQL 5.0 has been installed using the
installation and configuration wizards. See
Section 2.10.3.1, “Starting the MySQL Server Instance
Configuration Wizard”
.
On Unix, Linux and Mac OS X, MySQL programs read startup options from the following files, in the
specified order (top items are used first).
File Name
Purpose
/etc/my.cnf
Global options
SYSCONFDIR/my.cnf
Global options
$MYSQL_HOME/my.cnf
Server-specific options
defaults-extra-file
The file specified with
--defaults-extra-file=path
[239]
, if
any
~/.my.cnf
User-specific options
~
represents the current user's home directory (the value of
$HOME
).
SYSCONFDIR
represents the directory specified with the
--sysconfdir
option to
configure
when MySQL was built. By default, this is the
etc
directory located under the compiled-in installation
directory. This location is used as of MySQL 5.0.21. (From 5.0.21 to 5.0.53, it was read last, after
~/.my.cnf
.)
MYSQL_HOME
is an environment variable containing the path to the directory in which the server-
specific
my.cnf
file resides. (This was
DATADIR
prior to MySQL version 5.0.3.)
If
MYSQL_HOME
is not set and you start the server using the
mysqld_safe
program,
mysqld_safe
attempts to set
MYSQL_HOME
as follows:
• Let
BASEDIR
and
DATADIR
represent the path names of the MySQL base directory and data
directory, respectively.
• If there is a
my.cnf
file in
DATADIR
but not in
BASEDIR
,
mysqld_safe
sets
MYSQL_HOME
to
DATADIR
.
• Otherwise, if
MYSQL_HOME
is not set and there is no
my.cnf
file in
DATADIR
,
mysqld_safe
sets
MYSQL_HOME
to
BASEDIR
.
In MySQL 5.0, use of
DATADIR
as the location for
my.cnf
is deprecated.
Содержание 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 ...