Replicating specific databases only
As mentioned earlier, the master and slave database server do not need to be entirely in sync, with all databases and all tables from the master replicated onto the slave. By default, the slave will replicate everything, but you can change this behavior with the following options in the slave configuration file:
replicate-do-db=db_name (replicate this database) replicate-ignore-db=db_name (don't replicate this database) replicate-do-table=db_name.table_name (replicate this table) replicate-ignore-table=db_name.table_name (don't replicate this table) replicate--wild-do-table=db_name.table_name (allows wildcards, e.g db% would be all databases beginning with db) replicate-wild-ignore-table=db_name.table_name (ignore all specified tables, with wildcards)
These options can all be used multiple times in a single configuration. A couple of other useful options:
replicate-rewrite-db=master_db->slave_db (allows you to use map databases that use different database names on each server) log-slave-update (writes replicated statements to the slaves binary logs)
'리눅스 문서' 카테고리의 다른 글
The 5 minute DBA: Default My.cnf File (0) | 2014.11.25 |
---|---|
centos 6.2 oracle 10g 설치 (0) | 2014.11.25 |
PHP 와 MongoDB 사용법 (0) | 2014.11.25 |
레이어 팝업 - 닫기&오늘 하루 열지 않기 (0) | 2014.11.25 |
backuppc 소스설치 하기 (0) | 2014.11.25 |