APMserv中对MySQL优化的设置

来源:互联网 发布:无缝贴图制作软件 编辑:程序博客网 时间:2024/06/02 01:04
APMserv中的my.ini很干净,只有几行代码,注释全干掉了。

内存1G的优化:

[mysqld]
basedir=F:/APMServ5.2.6/MySQL5.1
datadir=F:/APMServ5.2.6/MySQL5.1/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=F:/APMServ5.2.6/MySQL5.1
datadir=F:/APMServ5.2.6/MySQL5.1/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
1 0
原创粉丝点击