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

  • A+
所属分类:LNMP

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

[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

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

目前评论:3   其中:访客  2   小编  1

    • yarluo yarluo 1

      链接已加,欢迎回访!

      • 豆花鱼导航 豆花鱼导航 0

        正需要这个