Using Tungsten-replicator4 to implement MySQL--> Monogo Data Synchronization

Source: Internet
Author: User
Tags chmod mysql host

Tungsten-replicator Technology Exchange Group: 376068310

A planning host:

192.168.67.128 #mysql主机 (pre-installed, installation steps see previous blog) 192.168.67.129 #mongodb主机 (pre-installed, installation steps see previous blog)

Two preconditions: (128 and 129)

1 Creating Tungsten Users

[[Email protected] ~] Useradd tungsten[[email protected] ~] passwd Tungsten

2 Add the Tungsten account to the MySQL user group

128 Host: [[email protected] ~] sudo usermod-g mysql tungsten129 host [[email protected] ~] sudo usermod-g mongod tungsten

3 Modify Sudoers permissions and allow tungsten users to password-free when using the sudo command

[[Email protected] ~] chmod 740/etc/sudoers[[email protected] ~ vi/etc/sudoers Add the following line: Tungsten all= (All) NO Passwd:all

4 Switch to Tungsten user

[[Email protected] ~] Su-tungsten

5 after switching to the tungsten user, create a key pair. default in/home/tungsten/.ssh directory

[[Email protected] ~] ssh-keygen-t RSA

6 Modifying the Limit file

[[Email protected] ~] vi/etc/security/limits.conf Add the following line: *-nofile 65535

7 Check if the modification was successful

[[Email protected] ~] Ulimit-n 65535

8 Configuring the Hosts

[[Email protected] ~] sudo vi/etc/hosts127.0.0.1 localhost192.168.67.128 host1192.168.67.129 host2

9 Test Host

[[Email protected] ~] Uname-nhost1

10 Test IP Address

[[Email protected] ~] hostname--ip-address

11 Firewall settings

[[Email protected] ~] iptables-a input-i lo-m State--state new-j ACCEPT

12 Copy the generated public and private keys to the tungsten user's home directory. The default is in the user home directory

[[Email protected] ~] CP. ssh/id_rsa.pub. ssh/id_rsa/home/tungsten/.ssh

13 put the public key into the. ssh/authorized_keys file,128 of the public key is placed in the 129,129 public key to

[[Email protected] ~] Cat. Ssh/id_rsa.pub >>. Ssh/authorized_keys

14 Modify Permissions

[[Email protected] ~] chmod ~/.ssh[[email protected] ~] ~/.ssh/*

15 testing inter-host SSH

[[Email protected] ~] ssh [email protected]

16 Modifying the MySQL configuration

[[Email protected]st ~] Vi/etc/my.cnfserver-id = 128open_files_limit = 65535log-bin = Mysql-binsync_binlog = 1max_allowed _packet = 52mdefault-storage-engine = Innodbinnodb_flush_log_at_trx_commit = 2binlog-format = Rowbinlog-row-image = Full

17 login MySQL, create user tungsten copy of MySQL user

[[Email protected] ~]/usr/bin/mysqlmysql> Grant all privileges on * * to [email protected] '% ' identified by ' TS ' with Grant options;mysql> flush privileges;

Three Installation Services:

1 Creating the Tungsten-replication software home directory

[[Email protected] ~] sudo mkdir/opt/continuent/soft[[email protected] ~] sudo chown-r tungsten/opt/continuent[[email p Rotected] ~] sudo chmod 700/opt/continuent

2 Upload the downloaded tungsten-replicator-4.0.0-2667425.tar.gz package to the soft directory

[[Email protected] ~] Cd/opt/continuent/soft[[email protected] software] ll [[email protected] software] Tungsten-replic Ator-4.0.0-2667425.tar.gz[[email protected] software] TAR-ZXVF tungsten-replicator-4.0.0-2667425.tar.gz[[email Protected] software] CD Tungsten-replicator-4.0.0-2667425[[email protected] tungsten-replicator-4.0.0-2667425]

On the 128 host (MySQL):

[[email protected] tungsten-replicator-4.0.0-2667425]./TOOLS/TPM Install alpha--info--master=192.168.67.128-- DATASOURCE-MYSQL-CONF=/ETC/MY.CNF--enable-heterogenous-master=true--replication-user=tungsten_alpha-- Replication-password=ts--install-directory=/opt/continuent/alpha--start-and-report

129 on the host (MONGO):

[Email protected] TUNGSTEN-REPLICATOR-4.0.0-2667425]./TOOLS/TPM Install alpha--info--datasource-type=mongodb-- master=192.168.67.128--members=192.168.67.129--enable-heterogenous-slave=true--topology=master-slave-- Install-directory=/opt/continuent/alpha--start-and-report

3 If the state of the two hosts is online, the Tungsten-replicator for both hosts are working correctly.


4 Create a table in the Tungsten_alpha library on the MySQL host and see if the synchronization was successful in the MONGO host


Using Tungsten-replicator4 to implement MySQL--> Monogo Data Synchronization

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.