首页 » MySQL »

小内存VPS如何配置Mysql

默认配置下mysql对于小内存的VPS来说是很耗费内存的。
按以下配置文件,可减少约100M内存开销

小内存VPS MySql配置文件修改如下(配置文件一般在/etc/my.cnf or /etc/mysql/my.cnf)

[mysqld]
key_buffer = 16K
max_allowed_packet = 1M
table_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 64K
skip-innodb

# this option may not work - if it doesn't simply omit it.
# known not to work in ubuntu 9.10, and likely other recent distributions as well.
skip-bdb

相关文章推荐

转载请保留,转载自:老牛博客
原文地址 http://xiaohost.com/1115.html

发表评论