Tungsten Replicator: data replication engine – MySQL master/slave server setup
Once, I made sure all the required Host Prerequisites are taken care of (including opening up ports 2112 and 10000 on both servers), I switched to tungsten user account and ran the installer with –master-slave set. The installer will also output and highlight any error messages if installation fails. You can also use –verbose option during install for more detailed process and error messages throughout the installation.
For –verbose install:
[root@centos6 ~]# mysqladmin create test2 [root@centos6 ~]# mysql -e "show databases;" +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | test | | test2 | | tungsten | | tungsten_rep1 | +--------------------+ [tungsten@centos6 tungsten]$ ./tungsten/tungsten-replicator/bin/trepctl services Processing services command... NAME VALUE ---- ----- appliedLastSeqno: 1 appliedLatency : 0.299 role : master serviceName : rep1 serviceType : local started : true state : ONLINE Finished services command... |
For normal install:
[tungsten@centos6 tungsten]$ ./tungsten/tungsten-replicator/bin/trepctl -service rep1 status Processing status command... NAME VALUE ---- ----- appliedLastEventId : mysql-bin.000006:0000000000000501;151 appliedLastSeqno : 1 appliedLatency : 0.299 clusterName : default currentEventId : mysql-bin.000006:0000000000000501 currentTimeMillis : 1316293854178 dataServerHost : 192.168.56.101 extensions : host : null latestEpochNumber : 0 masterConnectUri : thl://:/ masterListenUri : thl://192.168.56.101:2112/ maximumStoredSeqNo : 1 minimumStoredSeqNo : 0 offlineRequests : NONE pendingError : NONE pendingErrorCode : NONE pendingErrorEventId : NONE pendingErrorSeqno : -1 pendingExceptionMessage: NONE resourcePrecedence : 99 rmiPort : -1 role : master seqnoType : java.lang.Long serviceName : rep1 serviceType : local simpleServiceName : rep1 siteName : default sourceId : 192.168.56.101 state : ONLINE timeInStateSeconds : 2029.207 uptimeSeconds : 2034.258 Finished status command... |
Both .101 and .102 master and slave servers /opt/tungsten home directories populated with installed files
[tungsten@localhost tungsten]$ mysql -e "show databases;" +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | test | | test2 | | tungsten | | tungsten_rep1 | +--------------------+ [tungsten@localhost tungsten]$ ./tungsten/tungsten-replicator/bin/trepctl services Processing services command... NAME VALUE ---- ----- appliedLastSeqno: 1 appliedLatency : 26.72 role : slave serviceName : rep1 serviceType : local started : true state : ONLINE Finished services command... |