MySQL 512M至4G内存 配置文件优化记录

512m 内存服务器优化文件-my.ini

[mysqld]
basedir=C:/APMServ5.2.6/MySQL5.1
datadir=C:/APMServ5.2.6/MySQL5.1/data
port=3306
key_buffer=64M
max_allowed_packet=1M
table_cache=256
thread_cache=16
join_buffer_size=4M
sort_buffer=4M
record_buffer=4M
max_connections=500
wait_timeout=120
interactive_timeout=120
max_connect_errors=6000
long_query_time=1
max_heap_table_size=32M
tmp_table_size=16M
thread_concurrency=8
myisam_sort_buffer_size=16M
 

1g 内存服务器优化文件-my.ini

[mysqld]
basedir=C:/APMServ5.2.6/MySQL5.1
datadir=C:/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 内存服务器优化文件 -my.ini

[mysqld]
basedir=C:/APMServ5.2.6/MySQL5.1
datadir=C:/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
 

4g 内存服务器优化文件-my.ini

[mysqld]
basedir=C:/APMServ5.2.6/MySQL5.1
datadir=C:/APMServ5.2.6/MySQL5.1/data
port=3306
key_buffer=512M
max_allowed_packet=8M
table_cache=2048
thread_cache=128
join_buffer_size=64M
sort_buffer=64M
record_buffer=64M
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

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。