Andy's Blog » APMSERV, APMServ mysql, apmserv max_allowed_packet, apmserv mysql 优化, APMServ MYSQL优化, apmserv mysql 優化, apmserv设置max_allowed_packet, 阻止apmserv cache 写入, my.ini table_cache 1024 » APMserv中对MySQL优化的设置

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

Incoming search terms:

Tags: mysql, 优化, 服务器, my.ini

本文地址: http://blog.21andy.com/20070121/563.html