mysql主从复制核心配置

Master /etc/my.cnf

[mysqld]中增加

## replication
server_id=205
#binlog-do-db=roncoo
binlog-ignore-db=mysql
log-bin=edu-mysql-bin
binlog_cache_size=1M
binlog_format=mixed
expire_logs_days=7
slave_skip_errors=1062


Slave /etc/my.cnf

[mysqld]中增加

## replication
server_id=206
#binlog-do-db=roncoo
binlog-ignore-db=mysql
log-bin=edu-mysql-slave1-bin
binlog_cache_size = 1M
binlog_format=mixed
expire_logs_days=7
slave_skip_errors=1062
relay_log=edu-mysql-relay-bin
log_slave_updates=1
read_only=1

你可能感兴趣的:(Mysql数据库)