mysql设置主题_主题:MySql配置(网易的)

Hompy项目现使用2台数据服务器,主从数据库内存分别为8G和6G。

开始老是down机,以my-huge为基础配了很多次,都不行,

后来,借用了mail.sanook.com的配置,撑了一断时间,还是不理想。

再借用网易(163.com)一个子项目的my.cnf试了一下,几个月没down,先用它撑一下。

注:网易使用的是2G内存的。

共享一下:

# Example MySQL config file for very large systems.

#

# This is for a large system with memory of 1G-2G where the system runs mainly

# MySQL.

#

# You can copy this file to

# /etc/my.cnf to set global options,

# mysql-data-dir/my.cnf to set server-specific options (in this

# installation this directory is /var/lib/mysql) or

# ~/.my.cnf to set user-specific options.

#

# In this file, you can use all long options that a program supports.

# If you want to know which options a program supports, run the program

# with the "--help" option.

# The following options will be passed to all MySQL clients

[client]

#password       = your_password

port            = 3306

socket          = /var/lib/mysql/mysql.sock

# Here follows entries for some specific programs

# The MySQL server

[mysqld]

port            = 3306

socket          = /var/lib/mysql/mysql.sock

skip-locking

skip-innodb

skip-bdb

#back_log=100

back_log=200

#key_buffer=500M

key_buffer=512M

#key_buffer = 384M

#max_allowed_packet = 2M

#max_allowed_packet = 1M

ma

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值