블로그 이미지
BJcomm
bjcomm

공지사항

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

글 보관함

calendar

1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
11-22 00:03

mysql Replicating

2014. 11. 25. 17:53 | Posted by bjcomm

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