티스토리 뷰

DB/MySQL

my.cnf

swhwang 2016. 5. 4. 01:26
############################################
#STEP 01. 클라이언트 설정
[client]
socket=/MARIA_DATA/mysql.sock
############################################
#STEP 02. 인스턴스 설정
[mysqld]
user=root
# Character set Config
character-set-client-handshake=FALSE
character-set-server=utf8
init_connect=SET collation_connection = utf8_general_ci
init_connect=SET NAMES utf8

# Common Config
back_log=1024
binlog_cache_size=1M
ft_min_word_len=4
interactive_timeout=600
join_buffer_size=2M
max_allowed_packet=128M
max_heap_table_size=2048M
max_connections=1024
performance_schema
read_buffer_size=2M
read_rnd_buffer_size=8M
skip-external-locking
skip-name-resolve=1
sort_buffer_size=1M
max_length_for_sort_data=1024
tmp_table_size=2048M
table_open_cache=10240
transaction-isolation=REPEATABLE-READ 
open_files_limit = 8192

# Query Cache Disable
query_cache_type=0
query_cache_size=0

# Log Config
log-bin=/MARIA_LOG/binary/mysql-bin
relay-log=/MARIA_LOG/relay/relay-log
expire_logs_days=7        
max_binlog_size=1G
sync_binlog=1
binlog_format=mixed
relay_log_purge=0

log-error=/MARIA_LOG/error/mysql.err
slow_query_log_file=/MARIA_LOG/slow/mysql-slow-query.log
slow_query_log=1
long_query_time=2

# Innodb config
innodb_data_file_path=ibdata1:1024M;ibdata2:1024M;ibdata3:10M:autoextend
innodb_file_per_table=1
innodb_flush_method=ALL_O_DIRECT
innodb_lock_wait_timeout=15
innodb_log_buffer_size=128M
innodb_log_file_size= 512M
innodb_log_files_in_group=8
innodb_thread_sleep_delay=0
innodb_fast_shutdown
innodb_autoinc_lock_mode=1
innodb_thread_concurrency = 0

innodb_read_io_threads = 4

innodb_write_io_threads = 8

innodb_additional_mem_pool_size = 32M

innodb_open_files = 8192


#Thread Pool

thread_handling=pool-of-threads

thread_pool_stall_limit = 8092

thread_pool_idle_timeout = 120


# MyISAM Config
bulk_insert_buffer_size =       64M
key_buffer_size =      128M
myisam_max_sort_file_size       =       10G
myisam_recover
myisam_repair_threads   =       1
myisam_sort_buffer_size =       64M

# Replication related settings
log_bin_trust_function_creators = 1

basedir=/MARIA/mariadb
port=3301   #접속 포트 번호
socket=/MARIA_DATA/mysql.sock
pid-file=/MARIA_DATA/mysql.pid
datadir=/MARIA_DATA/DATA
tmpdir=/MARIA_DATA/tmpdir
innodb_data_home_dir=/MARIA_DATA/DATA
innodb_log_group_home_dir=/MARIA_DATA/DATA
#general_log=1                                           #general_log 설정 시 적용
#general_log_file=/MARIA_LOG/general/mysql_general.log  #general_log 설정 시 적용
innodb_buffer_pool_size = 12G   #인스턴스 별 innoDB  버퍼 풀 메모리 설정
innodb_buffer_pool_instances = 4
server-id=1   #인스턴스 번호

[mysqldump]
quick

max_allowed_packet=512M


[mysqladmin]
user = root

password = root

'DB > MySQL' 카테고리의 다른 글

LINE Developer Conference  (1) 2016.05.24
MySQL Parameter(my.cnf) 권장 값  (0) 2016.05.04
Another MySQL daemon already running with the same unix socket.  (0) 2016.05.04
테이블 스페이스 확인  (0) 2016.05.04
MySQLHangUpCheck.sh  (0) 2016.05.04
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
more
«   2025/08   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
글 보관함