mysql my.cnf 튜닝 관련 게시물
- mysql's my.cnf
http://cafe.naver.com/q69.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=118648 - 인트라원을 통해본 MySQL 튜닝
http://synap.tistory.com/entry/%EC%9D%B8%ED%8A%B8%EB%9D%BC%EC%9B%90%EC%9D%84-%ED%86%B5%ED%95%B4%EC%84%9C-%EB%B3%B8-MySQL-%ED%8A%9C%EB%8B%9D - MySQL FULLTEXT 검색
http://cafe.naver.com/q69.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=118648
my.cnf 기본 예제
# my-huge.cnf MySQL 전용으로 메모리가 1-2G 일 경우
# my-large.cnf MySQL 전용으로 메모리가 512 이상일 경우
# my-medium.cnf MySQL 전용으로 메모리가 32-64M 정도일 경우나
# 메모리가 128 이상이면서 다른 데몬과 같이 서비스 될 경우
# my-small.cnf MySQL 전용으로 메모리가 64M 이하일 경우
옵션들 문서
- Server System Variables
http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_datadir - Server Command Options
http://dev.mysql.com/doc/refman/5.1/en/server-options.html
기본설정
#mysql db 디렉토리설정
datadir=/var/lib/mysql
#socket 위치설정
socket=/wdb/mysql/mysql.sock
#mysql 구동 userid 설정
user=mysql
#password() 함수 사용시 old_passwords 사용하도록
old_passwords=1
# CPU * 2 로 thread_concurrency 설정
thread_concurrency = 8
메모리 사용 설정
# - mysql-huge.cnf 설정
key_buffer = 384M
max_allowed_packet = 1M
table_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
log-bin관련
#mysql-bin.?????? 파일이 쌓이도록
log-bin=mysql-bin
#특정 데이터베이스 제외시키려면
binlog-ignore-db=somedatabase
#query time 2초 이상인 slow query를 모아볼려면
log_query_time = 2
log-slow-queries = /var/lib/mysql/slowqueries.log
#bdb와 innodb 로그남지 않도록
skip-bdb
skip-innodb
character-set 설정
#utf-8로 설정하는 예제(sitehis.com의 경우)
init_connect=SET collation_connection = utf8_general_ci
init_connect=SET NAMES utf8
default-character-set=utf8
character-set-server=utf8
collation-server=utf8_general_ci
FULLTEXT 검색관련
# 2자 이상의 단어에 대해서 fulltext 검색하도록 (sitehis.com의 경우)
ft_min_word_len=2
보안관련
# LOAD DATA LOCAL INFILE command 못하게
set-variable=local-infile=0
기타
~/.mysql_history 저장안되고
cat /dev/null > ~/.mysql_history
'Mysql' 카테고리의 다른 글
mysql 백업 및 복구 (0) | 2015.10.07 |
---|---|
my sql 초기 비밀번호 설정 (0) | 2015.05.20 |
my.cnf 설정 팁 (0) | 2015.04.15 |
my.cnf 설정 팁 (0) | 2015.04.06 |
ms-sql 권한 부여 (0) | 2015.04.03 |