MariaDB my.cnf詳細
4017 ワード
# /usr/share/mysql/my-huge.cnf
# MariaDB (huge, ).
#
# , 1G-2G
# MariaDB ,
#
# MariaDB ,
# ( ),
# , :
# 'my_print_defaults --help'
# Default options are read from the following files in the given order:
# (--> .) ( ) .
# : http://dev.mysql.com/doc/mysql/en/option-files.html
#
# , .
# ,
# "--help" , .
# MySQL ,
[client]
#password = your_password
port = 3306
socket = /var/lib/mysql/mysql.sock
# ,
# MySQL server
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-external-locking
key_buffer_size = 384M
max_allowed_packet = 1M
table_open_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 32M
# , CPU 2: CPU's*2 for thread_concurrency
thread_concurrency = 8
# , SSD
#tmpdir = /tmp/
# TCP/IP .
# mysqld, ,
# mysqld Unix sockets (named pipes) .
# , Windows (named pipes),
# ( "enable-named-pipe" ) mysqld !
#skip-networking
# Replication Master Server (default)
# ,
log-bin=mysql-bin
# 1 2^32 - 1 ID, , .
# master-host, 1
# , (master)
server-id = 1
# Replication Slave ( master , )
#
# (replication slave),
# :
#
# 1) CHANGE MASTER TO ( ) -
# :
#
# CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
# MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
# <host>, <user>, <password> ,
# <port> master ( 3306).
#
# :
#
# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
# MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# :
#
# 2) . , ,
# ( , master-password ,
# slave ), slave master.info ,
# (xxx.cnf) , ,
# master.info ,
# slave , master.info slaver server.
# , ( <> ),
# CHANGE MASTER TO ( 1)
#
#
# 2 2^32 - 1 ID,
# , .
# master-host, 2
# , slave
#server-id = 2
#
# slave master. - required
#master-host = <hostname>
#
# slave master username
# - ( )
#master-user = <username>
#
# slave master password
# - ( )
#master-password = <password>
#
# master
# - 3306
#master-port = <port>
#
# , slave ,
#log-bin=mysql-bin
#
# —— mixed
#binlog_format=mixed
# InnoDB ,
#innodb_data_home_dir = /var/lib/mysql
#innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
#innodb_log_group_home_dir = /var/lib/mysql
# InnoDB, .._buffer_pool_size 50 - 80 %
#
#innodb_buffer_pool_size = 384M
#
#innodb_additional_mem_pool_size = 20M
# .._log_file_size buffer pool size 25 %
#innodb_log_file_size = 100M
# , ,1
#innodb_log_buffer_size = 8M
# 1, ;
# 2, , , 0 .
#innodb_flush_log_at_trx_commit = 1
# ,
#innodb_lock_wait_timeout = 50
[mysqldump]
# / ,
quick
#
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# SQL , , where .
#safe-updates
[myisamchk]
key_buffer_size = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout