my.cnf
3.22, MySQL .
MySQL ( Unix) (. 4.11):
4.11.
/etc/my.cnf | |
DATADIR/my.cnf | |
defaults-extra-file | , defaults-extra-file=# |
~/.my.cnf |
DATADIR MySQL ( /usr/local/mysql/data /usr/local/var). , , , datadir mysqld! datadir , , , .
MySQL ( Windows) (. 4.12):
4.12. Windows.
windows-system-directory\my.ini | |
: \my.cnf | |
: \mysql\data\my.cnf |
, Windows / \. \, , \ ESC MySQL.
MySQL , . , , , . , , , . . , , .
: mysql, mysqladmin, mysqld, mysqldump, mysqlimport, mysql.server, myisamchk myisampack.
, , . help, .
:
#comment
# ";". .
[group]
group , . option set-variable , .
option
option .
option=value
option=value .
set-variable = variable=value
-set-variable variable=value . , mysqld.
client , MySQL ( mysqld). , , , . , .
, . \b, \t, \n, \r, \\ \s (\s ).
:
[client]
port=3306
socket=/tmp/mysql.sock
[mysqld]
port=3306
socket=/tmp/mysql.sock
set-variable = key_buffer_size=16M
set-variable = max_allowed_packet=1M
[mysqldump]
quick
:
[client]
# The following password will be sent to all standard MySQL clients
password=my_password
[mysql]
no-auto-rehash
set-variable=connect_timeout=2
[mysqlhotcopy]
interactive-timeout
, my-xxxx.cnf support-files. DIR/support-files, DIR MySQL ( /usr/local/mysql). , , . my-xxxx.cnf ( .my.cnf), .
MySQL, , :
-no-defaults
.
-print-defaults
, .
-defaults-file=full-path-to-default-file.
.
-defaults-extra-file=full-path-to-default-file
, .
, , ! print-defaults defaults-xxx-file.
my_print_defaults, :
shell> my_print_defaults client mysql -port=3306
socket=/tmp/mysql.sock -no-auto-rehash
client mysql.