`
Merrygrass
  • 浏览: 165217 次
  • 性别: Icon_minigender_1
  • 来自: 重庆
社区版块
存档分类
最新评论

mysql优化my.ini

阅读更多

服务器2GB内存,MySql优化my.ini

 

[client]
port=3306

[mysql]
default-character-set=utf8

[mysqld]
bind-address=0.0.0.0
basedir=/usr/
datadir=/var/lib/mysql/
default-character-set=utf8
max_connections=1000
query_cache_size=64M
query_cache_min_res_unit=6
query_alloc_block_size=1128M
key_cache_block_size=2048
tmp_table_size=32M
thread_cache_size=8
key_buffer_size=512M
read_buffer_size=4096K
sort_buffer_size=64M
innodb_additional_mem_pool_size=256M
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=4M
innodb_buffer_pool_size=500M
innodb_doublewrite=0
innodb_log_file_size=100M
innodb_thread_concurrency=8
innodb_lock_wait_timeout=10
wait_timeout=10
back_log=80
table_cache=256M
table_open_cache=128M
binlog_cache_size=20M

[mysqldump]
quick
max_allowed_packet=256M

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics