Archive for September, 2008

0031 | MySQL: my.cnf

Tuesday, September 2nd, 2008 Posted in Database | 2 Comments »

เอามาเก็บไว้ฮะ สำหรับแรม 4gb ฐานข้อมูลขนาด 1 gb

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
set-variable=local-infile=0
skip-character-set-client-handshake
skip-name-resolve
skip-bdb
max_connections = 600
key_buffer = 512M
myisam_sort_buffer_size = 32M
join_buffer_size = 1M
read_buffer_size = 2M
sort_buffer_size = 4M
table_cache = 1536
thread_cache = 8
thread_concurrency = 4
thread_cache_size = 256
wait_timeout = 600
connect_timeout = 10
max_tmp_tables = 256
tmp_table_size = 64M
max_allowed_packet = 16M
max_connect_errors = 10
query_cache_limit = 1M
query_cache_size = 32M
query_cache_type = 1
query_prealloc_size = 16384
query_alloc_block_size = 16384
log_slow_queries
log_queries_not_using_indexes

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
open_files_limit = 8192

Tags: , ,