MySQL内存占用优化 - 低内存VPS必备

2010-3-4 22:27:45  分类:技术文章  作者:xloong 已被围观loading 被网友评论0条 我要评论

Linode提供了一个用于低内存服务器的MySQL内存占用优化建议,可以用来参考。

配置文件: /etc/my.cnf

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

# Low memory optimizations
skip-bdb
skip-innodb
skip-networking
server-id = 1
key_buffer = 256K
max_allowed_packet=1M
thread_stack = 64K
table_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 64K
query_cache_limit=256K
query_cache_size = 2M

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/my

via 秋天博客

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
如原创文章转载,请注明: 转自:夜火博客 [ http://www.15897.com/ ]

本文链接地址: http://www.15897.com/blog/post/MySQL-neicun-zhanyong-youhua.html

Tags: MySql   VPS   技术类  

| More

已有0位网友对本文做了一针见血的评论 【我要评论

评论:



< # TEMPLATE_INCLUDE_POSTAD # >
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

订阅RSS

搜 索

最新发表

最新评论

最新留言

其 他