Mysql 配置文件,適合用於內存爲 512MB 的主機

配置文件:/etc/my.cnf,配置僅供參考。mysql

[client]
port = 3306
socket = /tmp/mysql.socksql

[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-external-locking
key_buffer_size = 24M
sort_buffer_size = 512K
read_buffer_size = 2Msocket

read_rnd_buffer_size = 4Mui

join_buffer_size = 256K
thread_cache_size = 10
query_cache_size = 1M
query_cache_limit = 2M
query_cache_min_res_unit = 4Kserver

thread_concurrency = 2ip

table_cache = 720
table_open_cache = 720hash

open_files_limit = 1000
back_log = 80
max_connections = 100
max_connect_errors = 200
external-locking = FALSEit

max_allowed_packet = 16M
default-storage-engine = MyISAM
thread_stack = 192K
transaction_isolation = READ-COMMITTEDio

tmp_table_size = 4Mtable

max_heap_table_size = 32M

bulk_insert_buffer_size = 4M

myisam_sort_buffer_size = 8M

myisam_max_sort_file_size = 10G
myisam_repair_threads = 1
myisam_recover

server-id = 1

[mysqldump]
quick
max_allowed_packet = 32M

[mysql]
no-auto-rehash

[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]interactive-timeout

相關文章
相關標籤/搜索