首页 > 代码库 > 一个mysql的master的my.cnf

一个mysql的master的my.cnf

[mysqld]

port = 3306

socket = /tmp/mysql.sock

datadir=/data/mysql/data

server-id = 1


skip-name-resolve

expire_logs_days=15


log-bin=mysql-bin

binlog_format=mixed


replicate-do-db=allin_platform

replicate-do-db=allin_platform_log


slow_query_log = ON

long_query_time = 2

slow_query_log_file=/data/mysql/data/mysql-master-slow.log


#explicit_defaults_for_timestamp=true

query_cache_type=1   


key_buffer_size = 512M

max_allowed_packet = 8M

#table_open_cache = 2000

sort_buffer_size = 16M

#net_buffer_length = 8K

read_buffer_size = 32M

#read_rnd_buffer_size = 256K

myisam_sort_buffer_size = 16M

default-storage-engine=INNODB

max_connections=500

innodb_log_buffer_size=16M

innodb_buffer_pool_size=2048M

character_set_server=utf8 

innodb_sort_buffer_size = 8M


#innodb_buffer_pool_instances = 8

#innodb_flush_log_at_trx_commit = 1

innodb_file_per_table = OFF


#open_files_limit = 10000

query_cache_limit = 4M

query_cache_size = 512M


[client]

port              = 3306

socket          = /tmp/mysql.sock


[mysqldump]

quick

max_allowed_packet = 16M


[mysql]

no-auto-rehash


[myisamchk]

key_buffer_size = 20M

sort_buffer_size = 20M

read_buffer = 2M

write_buffer = 2M


[mysqlhotcopy]

interactive-timeout


一个mysql的master的my.cnf