码迷,mamicode.com
首页 > 其他好文 > 详细

比较完整的配置 根据硬件改数值就好

时间:2014-08-12 03:41:04      阅读:196      评论:0      收藏:0      [点我收藏+]

标签:following   programs   important   systems   together   

# Example MySQL config file for medium systems.

#

# This is for a system with little memory (32M - 64M) where MySQL plays

# an important part, or systems up to 128M where MySQL is used together with

# other programs (such as a web server)

#

# MySQL programs look for option files in a set of

# The following options will be passed to all MySQL clients



[client]

#password = your_password

port = 3306

socket = /tmp/mysql.sock

default-character-set = utf8



# The MySQL server

[mysqld]

port = 3306

socket = /tmp/mysql.sock

max_connections = 500

skip-external-locking

skip-name-resolve

back_log = 512

key_buffer_size = 256M

max_allowed_packet = 4M

table_open_cache = 64

thread_stack = 256K

table_cache = 128K

sort_buffer_size = 1M

net_buffer_length = 8K

read_buffer_size = 256K

read_rnd_buffer_size = 512K

join_buffer_size = 8M

myisam_sort_buffer_size = 8M

thread_cache_size = 64

character-set-server = utf8

thread_concurrency = 4

interactive_timeout = 30

wait_timeout = 20 

skip-networking

log_slow_queries = /var/log/mysql/slow.log

log-error=/var/log/mysql/error.log

long_query_time = 5

log-bin = mysql-bin

binlog_format=mixed

server-id = 1

################################################################

# Uncomment the following if you are using InnoDB tables

innodb_data_home_dir = /usr/local/mysql/data

innodb_data_file_path = ibdata1:10M:autoextend

innodb_log_group_home_dir = /usr/local/mysql/data

# You can set .._buffer_pool_size up to 50 - 80 %

# of RAM but beware of setting memory usage too high

innodb_buffer_pool_size = 1024M

innodb_additional_mem_pool_size = 10M

# Set .._log_file_size to 25 % of buffer pool size

innodb_log_file_size = 5M

innodb_log_buffer_size = 8M

innodb_flush_log_at_trx_commit = 1

innodb_lock_wait_timeout = 50

###############################################################

[mysqldump]

quick

max_allowed_packet = 16M


[mysql]

auto-rehash

#no-auto-rehash

# Remove the next comment character if you are not familiar with SQL

#safe-updates


[myisamchk]

key_buffer_size = 20M

sort_buffer_size = 20M

read_buffer = 2M

write_buffer = 2M


[mysqlhotcopy]

interactive-timeout


本文出自 “信不信由你” 博客,请务必保留此出处http://312461613.blog.51cto.com/965442/1538678

比较完整的配置 根据硬件改数值就好,布布扣,bubuko.com

比较完整的配置 根据硬件改数值就好

标签:following   programs   important   systems   together   

原文地址:http://312461613.blog.51cto.com/965442/1538678

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!