tungsten-replicator 实现mysql 与mysql同步,
分享于 点击 23457 次 点评:193
tungsten-replicator 实现mysql 与mysql同步,
1,centos 5.3 安装tungsten 需要ruby ,java
- [root@localhost ~]# java -version
- java version "1.6.0_25"
- Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
- Java HotSpot(TM) Client VM (build 20.0-b11, mixed mode, sharing)
2,还需要ssh 自动登录
配置方法:http://asuper.blog.51cto.com/1622151/1102050
3,下载http://code.google.com/p/tungsten-replicator/downloads/list
本人按装 tungsten-replicator-2.0.6-src.tar.gz
master上面创建mysql账号:
CREATE USER 'tungsten'@'%' IDENTIFIED BY '123456';
GRANT ALL ON *.* TO 'tungsten'@'%' WITH GRANT OPTION
解压后,再master或slave任意一台机器上,执行即可
- [root@localhost tungsten-replicator-2.0.6]# ./tools/tungsten-installer --master-slave \
- > --master-host=192.168.52.128 \
- > --datasource-user=tungsten \
- > --datasource-password=123456 \
- > --service-name=logos \
- > --home-directory=/data/tungsten-replicator-2.0.6 \
- > --cluster-hosts=192.168.52.128,192.168.52.133 \
- > --start-and-report
- WARN >> 192.168.52.128 >> 32-bit architecture not recommended for DBMS nodes
- WARN >> 192.168.52.128 >> THL schema tungsten_logos already exists at tungsten@192.168.52.128:3306 (WITH PASSWORD)
- WARN >> 192.168.52.128 >> The value of max_allowed_packet is too small for tungsten@192.168.52.128:3306 (WITH PASSWORD)
- WARN >> 192.168.52.133 >> 32-bit architecture not recommended for DBMS nodes
- WARN >> 192.168.52.133 >> THL schema tungsten_logos already exists at tungsten@192.168.52.133:3306 (WITH PASSWORD)
- WARN >> 192.168.52.133 >> The value of max_allowed_packet is too small for tungsten@192.168.52.133:3306 (WITH PASSWORD)
- INFO >> 192_168_52_128 >> Getting services list
- INFO >> 192_168_52_128 >> ....
- Processing services command...
- NAME VALUE
- ---- -----
- appliedLastSeqno: 3
- appliedLatency : 1.356590497686E9
- role : master
- serviceName : logos
- serviceType : local
- started : true
- state : ONLINE
- Finished services command...
- INFO >> 192_168_52_133 >> Getting services list
- INFO >> 192_168_52_133 >> ..
- Processing services command...
- NAME VALUE
- ---- -----
- appliedLastSeqno: 3
- appliedLatency : 1.356647435914E9
- role : slave
- serviceName : logos
- serviceType : local
- started : true
- state : ONLINE
- Finished services command...
相关文章
- 暂无相关文章
用户点评