Spec-Zone .ru
спецификации, руководства, описания, API
|
As of MySQL 5.6.8, on Unix platforms, mysql_install_db creates a default option file named my.cnf
in the base installation directory. This file is created from a template
included in the distribution package named my-default.cnf
. You can find the
template in or under the base installation directory. When started using mysqld_safe, the server uses my.cnf
file by default. If my.cnf
already exists,
mysql_install_db
assumes it to be in use and writes a new file named my-new.cnf
instead.
With one exception, the settings in the default option file are commented and have no effect. The exception is
that the file changes the sql_mode
system variable from its default of NO_ENGINE_SUBSTITUTION
to also include STRICT_TRANS_TABLES
. This setting produces a server configuration that
results in errors rather than warnings for bad data in operations that modify transactional tables. See Section
5.1.7, "Server SQL Modes".
The my-default.cnf
template replaces the older sample option files formerly
supplied with MySQL distributions (my-small.cnf
, my-medium.cnf
,
my-large.cnf
, and my-huge.cnf
). As of MySQL 5.6.8,
these older files are no longer distributed.
On Windows, MySQL Installer interacts with the user and creates a file named my.ini
in the base installation directory as the default option file. If you install
on Windows from a Zip archive, you can copy the my-default.ini
template file in
the base installation directory to my.ini
and use the latter as the default option
file.
On Windows, the .ini
or .cnf
option
file extension might not be displayed.
On any platform, after completing the installation process, you can edit the default option file at any time to
modify the parameters used by the server. For example, to use a parameter setting in the file that is commented
with a #
character at the beginning of the line, remove the #
, and modify the parameter value if necessary. To disable a To disable a
setting, either add a #
to the beginning of the line or remove it.
For additional information about option file format and syntax, see Section 4.2.3.3, "Using Option Files".
Before MySQL 5.6.8, MySQL distributions include several sample option files that can be used as a basis for
tuning the MySQL server. Look for files named my-small.cnf
, my-medium.cnf
, my-large.cnf
, and my-huge.cnf
, which are sample files for small, medium, large, and very large
systems. On Windows, the extension is .ini
rather than .cnf
.
For a binary distribution, look for the sample files in or under your installation directory. If you have a
source distribution, look in the support-files
directory. To use a sample file as
a base configuration file, rename a copy of it and place the copy in the appropriate location. Regarding names
and appropriate location, see the general information provided in Section
4.2.3.3, "Using Option Files".