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
 

你可能感兴趣的:(mysql,数据库,职场,休闲,配置文件优化)