APMserv中对MySQL优化的设置

以后自己搭环境可以参考这个设置。
APMserv中的my.ini很干净,只有几行代码,注释全干掉了。

内存1G的优化:

[mysqld]
basedir=D:/AndyServer/MySQL5.0
datadir=D:/AndyServer/MySQL5.0/data
port=3306
key_buffer=256M
max_allowed_packet=2M
table_cache=512
thread_cache=32
join_buffer_size=16M
sort_buffer=16M
record_buffer=16M
max_connections=500
wait_timeout=120
interactive_timeout=120
max_connect_errors=30000
long_query_time=1
max_heap_table_size=128M
tmp_table_size=64M
thread_concurrency=8
myisam_sort_buffer_size=64M

内存2G的优化:

[mysqld]
basedir=D:/AndyServer/MySQL5.0
datadir=D:/AndyServer/MySQL5.0/data
port=3306
key_buffer=384M
max_allowed_packet=4M
table_cache=1024
thread_cache=64
join_buffer_size=32M
sort_buffer=32M
record_buffer=32M
max_connections=500
wait_timeout=120
interactive_timeout=120
max_connect_errors=30000
long_query_time=1
max_heap_table_size=256M
tmp_table_size=128M
thread_concurrency=8
myisam_sort_buffer_size=128M

你可能感兴趣的:(thread,mysql,cache)