512M内存 linux VPS中的mysql配置
以下是512M内存 linux VPS中的mysql配置,各个参数的意义朋友们可以百度下。
配置文件:/etc/my.cnf,配置仅供参考。
[client]
port = 3306
socket = /tmp/mysql.sock
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-external-locking
key_buffer_size = 24M
sort_buffer_size = 512K
read_buffer_size = 2M
read_rnd_buffer_size = 4M
join_buffer_size = 256K
thread_cache_size = 10
query_cache_size = 1M
query_cache_limit = 2M
query_cache_min_res_unit = 4K
thread_concurrency = 2
table_cache = 720
table_open_cache = 720
open_files_limit = 1000
back_log = 80
max_connections = 100
max_connect_errors = 200
external-locking = FALSE
max_allowed_packet = 16M
default-storage-engine = MyISAM
thread_stack = 192K
transaction_isolation = READ-COMMITTED
tmp_table_size = 4M
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