95 번 글: [mysql] replication |
글쓴이: 산이
[홈페이지]
|
글쓴날: 2006년 05월 10일 23:23:01 수(저녁) |
조회: 3169 |
[replication-master]
1) mysql >= 4.0.2
mysql> GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.*
TO 'rep'@'xxx.xxx.xxx.%' IDENTIFIED BY '암호';
*) notic
add more privileges : SUPER and RELOAD
but, mysql-4.0.2 is FILE privileges
2) mysql < 4.0.2
mysql> GRANT FILE ON *.*
TO 'rep'@'xxx.xxx.xxx.%' IDENTIFIED BY '암호';
----------------------
[mysqld]
skip-locking
skip-name-resolve
log
log-bin ## <-- require
server-id = 1 ## <-- require
binlog-do-db = board1
binlog-do-db = board2
Binlog-ignore-db = mysql
...
----------------------
[replication-slave]
----------------------
[mysqld]
skip-locking
skip-name-resolve
log
server-id = 2
master-host = master_ip_or_hostname
master-user = rep
master-password = 암호
master-port = 3306
#master-connect-retry = 60
replicate-do-db = board1
replicate-do-db = board2
replicate-ignore-db = mysql
...
----------------------
[slave 에서 replication 이 실시간으로 안 될 때]
slave> rm -f ${DB_DIR}/*.info ${DB_DIR}/*-bin*
Slave> rsync –va rsync://master/masterdb/ path/to/slavedb/
slave> safe_mysqld &
|
이전글 : [Apache] request 제한 및 로그 포맷
다음글 : [PHP] sysvsem,sysvshm, sysvmsg, memcache
|
from 222.234.157.242
JS(Redhands)Board 0.4 +@
|
|