sunny_zhao0127
作者sunny_zhao0127·2014-03-24 16:36
数据库管理员·C.H.Robinsion

mysql master_my.cnf

字数 4236阅读 896评论 0赞 0

[client]
#password       = your_password
port            = 3306
socket          = /usr/local/mysql/tmp/mysql.sock

[mysqld]
#init-connect='insert into accesslog.accesslog values(connection_id(),now(),user(),current_user())'
innodb_file_per_table
skip-external-locking
skip-name-resolve
big_tables
local-infile    = 0
port            = 3306
socket          = /usr/local/mysql/tmp/mysql.sock
tmpdir          = /usr/local/mysql/tmp/
character-set-server = utf8
max_allowed_packet   = 16M
table_cache          = 1024
max_connections      = 2048
wait_timeout         = 28800 #200
interactive_timeout  = 28800 #300
thread_cache         = 300
thread_concurrency   = 8
table_cache          = 512
net_read_timeout     = 30   #( default 30 )
net_write_timeout    = 30   #( default 30 )
net_retry_count      = 10   #( default 10 )
connect_timeout      = 10   #( default 10 )
key_buffer_size      = 256M
#-------------------------------------------------------------
query_cache_type         = 0
query_cache_limit        = 8MB
query_cache_min_res_unit = 4KB
query_cache_size         = 256M
#-------------------------------------------------------------
group_concat_max_len = 999999999
#---1028
#wait_timeout=31536000
#interactive_timeout=31536000

# --- thread_buffers ----------------

sort_buffer_size        = 4M
bulk_insert_buffer_size = 4M
myisam_sort_buffer_size = 32M
read_buffer_size        = 2M
read_rnd_buffer_size    = 512K
join_buffer_size = 64M
max_heap_table_size  = 2000M
tmp_table_size       = 2000M

#skip-networking
skip-slave-start

#-------------- slow query -------------------------------------------------

long_query_time = 1
slow-query-log=/var/log/mysql/slow-queries.log
log_slow_queries=/var/log/mysql/slow-queries.log
#log-queries-not-using-indexes

#--------------------- log bin -------------------------------------------
server-id       =  10341
log-bin=/mysqlbinlog/shamysql-bin
log-bin-trust-function-creators=1
max_binlog_cache_size = 500M
max_binlog_size = 500M
sync_binlog = 0
#expire_logs_days = 30
#log-slave-updates
binlog_format=mixed
max_relay_log_size = 100M
binlog_format      = mixed
log-bin-trust-function-creators = 1
binlog-row-event-max-size       = 1024
binlog_direct_non_transactional_updates = 1

#------------------- innodb ----------------------------------------------

default-storage-engine = innodb
innodb_data_home_dir =
innodb_data_file_path=/mysqldata/ibdata1:2000M;/usr/local/mysql/data/ibdata2:2000M:autoextend
innodb_log_group_home_dir = /mysqldata
innodb_buffer_pool_size=7168M
innodb_additional_mem_pool_size=64M
innodb_log_files_in_group = 2
innodb_log_file_size=250M
innodb_log_buffer_size=512M
innodb_flush_log_at_trx_commit=2
innodb_lock_wait_timeout=50
innodb_rollback_on_timeout
innodb_checksums=0
innodb_support_xa=0
innodb_doublewrite=0
innodb_thread_concurrency  = 100
innodb_concurrency_tickets  = 1000
innodb_locks_unsafe_for_binlog=1
transaction-isolation = REPEATABLE-READ


[mysqldump]
quick
max_allowed_packet = 16M
#default-character-set = utf8

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout

如果觉得我的文章对您有用,请点赞。您的支持将鼓励我继续创作!

0

添加新评论0 条评论

Ctrl+Enter 发表

作者其他文章

  • sql10007N
    评论 0 · 赞 0
  • DB2 概要文件注册表
    评论 0 · 赞 0
  • db2 升级步骤
    评论 0 · 赞 0
  • Innobackup
    评论 0 · 赞 0
  • 日期时间&xml数据类型
    评论 0 · 赞 0
  • 相关文章

    相关问题

    相关资料

    X社区推广