【自用】小内存VPS安装lnmp后MySQL推荐设置

以下是老牛之前一个小内存VPS用的mysql数据库配置,
今天整理硬盘发现这个笔记,贴出来大家可以参考

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
[mysqld]
port            = 3306
socket          = /var/lib/mysql/mysql.sock
skip-locking
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-bdb
skip-innodb

query_cache_limit=256K
query_cache_size = 2M

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
#safe-updates

[isamchk]
key_buffer = 8M
sort_buffer_size = 8M

[myisamchk]
key_buffer = 8M
sort_buffer_size = 8M

[mysqlhotcopy]
interactive-timeout
原文链接:https://xiaohost.com/838.html,转载请注明出处。
0

评论3

请先
  1. 正需要这个
    • 欢迎收藏 互相学习
      站长 2014-05-28 0
  2. 链接已加,欢迎回访!
    yarluo 2014-05-29 0