本文共 1830 字,大约阅读时间需要 6 分钟。
主库配置
# For advice on how tochange settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
#*** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.
[client]
port = 3306
socket=/tmp/mysql.sock
[mysqld]
port = 3306
socket=/tmp/mysql.sock
skip-external-locking
datadir=/usr/local/mysql/data
key_buffer_size = 32M
max_allowed_packet = 1M
table_open_cache = 4096
sort_buffer_size = 4M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
lower_case_table_names = 0
log-bin=master-bin
log-bin-index=master-bin.index
binlog_format=mixed
max_allowed_packet=50M
connect_timeout=60
net_read_timeout = 60
max_connections=2000
binlog-do-db=jrd
replicate-do-db=jrd
binlog-ignore-db=mysql
binlog-ignore-db=test
binlog-ignore-db=information_schema
binlog-ignore-db=performance_schema
replicate-ignore-db=test
replicate-ignore-db=mysql
replicate-ignore-db=information_schema
replicate-ignore-db=performance_schema
binlog-ignore-db=mysql,test
server-id = 1
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
# These are commonly set, remove the # and set as required.
# basedir = .....
# datadir = .....
# port = .....
# server_id = .....
# socket = .....
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
转载地址:http://uqudv.baihongyu.com/