日期:2014-05-16 浏览次数:20973 次
同ubuntu下配置:(转自:http://archive.cnblogs.com/a/2214282/)
Master 1 Config File:
?
#
# The MySQL database server configuration file.
#
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
default-character-set = utf8
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
#My Features
default-character-set = utf8
skip-name-resolve
default-storage-engine = InnoDB
default-table-type = InnoDB
innodb_flush_log_at_trx_commit=0
federated
#Master
server-id = 1
log-bin=mysql-bin
binlog-do-db=s3
binlog-ignore-db=mysql
sync_binlog=1
auto_increment_increment=2
auto_increment_offset=1
#Slave
skip-name-resolve
slave-skip-errors
log-slave-updates
master-user=sync
master-password=123456
master-port=3306
master-connect-retry=30
replicate-do-db=s3
relay-log=S3-DB-M-1-relay-bin
#
# * Basic Settings
#
user = mysql
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address = 127.0.0.1
#
# * Fine Tuning
#
key_buffer = 16M