Get the App
SLTechnology News&Howtos  ›  Database  › 

Alibaba otter, a tool for remote synchronization of MySQL database

Shulou Source: shulou.com Published: 2022-06-01 17:56:44 09月28日 Update

This article is mainly about the MySQL database to achieve remote synchronization tool alibaba otter content, if you are interested to take a look at this article, I believe that after reading the MySQL database to achieve remote synchronization tool alibaba otter to you more or less reference value.

[root@wallet01 ~] # tar zxvf zookeeper-3.4.14.tar.gz-C / usr/local/ [root@wallet01 ~] # cd / usr/local/zookeeper-3.4.14/conf [root@wallet01 conf] # mv zoo_sample.cfg zoo.cfg [root@wallet01 conf] # vi log4j.propertieslog4j.rootLogger=INFO ROLLINGFILE [root@wallet01 ~] # cd / usr/local/zookeeper-3.4.14/bin [root@wallet01 bin] # vi zkEnv.shif ["x$ {ZOO_LOG_DIR}" = "x"] then ZOO_LOG_DIR= "/ usr/local/zookeeper-3.4.14/logs" fiif ["x$ {ZOO_LOG4J_PROP}" = "x"] then ZOO_LOG4J_PROP= "INFO ROLLINGFILE "fi [root@wallet01 ~] # mkdir-p / usr/local/zookeeper-3.4.14/logs [root@wallet01 ~] # vi / etc/profilePATH=$PATH:/usr/local/zookeeper-3.4.14/bin [root@wallet01 ~] # zkServer.sh startZooKeeper JMX enabled by defaultUsing config: / usr/local/zookeeper-3.4.14/bin/../conf/zoo.cfgStarting zookeeper. STARTED [root@wallet01 ~] # zkServer.sh statusZooKeeper JMX enabled by defaultUsing config: / usr/local/zookeeper-3.4.14/bin/../conf/zoo.cfgMode: standalone [root@wallet01 ~] # yum install-y nc [root@wallet01 ~] # wget https://raw.github.com/alibaba/otter/master/manager/deployer/src/main/resources/sql/otter-manager-schema.sql-no-check-certificate [root@wallet01 ~] # mysql-uroot-pabcd.1234mysql > Source otter-manager-schema.sqlmysql > create user otter@'%' identified by "otter" Query OK, 0 rows affected (0.08 sec) mysql > grant all on otter.* to otter@'%'Query OK 0 rows affected (0.00 sec) [root@wallet01 ~] # mkdir-p / usr/local/manager [root@wallet01 ~] # tar zxvf manager.deployer-4.2.17.tar.gz-C / usr/local/manager [root@wallet01 ~] # cd / usr/local/manager/conf/ [root@wallet01 conf] # vi otter.properties # # otter manager domain nameotter.domainName = 192.168.40.34 percent # otter manager http portotter.port = 8080 percent # otter manager database configotter.database.driver. Class.name = com.mysql.jdbc.Driverotter.database.driver.url = jdbc:mysql://127.0.0.1:3306/otterotter.database.driver.username = otterotter.database.driver.password = otter## otter communication portotter.communication.manager.port = 1099 cycles # default zookeeper addressotter.zookeeper.cluster.default = 192.168.40.34 otterotter.database.driver.password 2181 default zookeeper sesstion timeout = 60sotter.zookeeper.sessionTimeout = 60000 [root@wallet01 ~] # cd / usr/local/manager/bin [root@wallet01 bin ] #. / startup.sh [root@wallet01 ~] # cd / usr/local/manager/logs [root@wallet01 logs] # cat manager.log2018-11-19 10 cd 26.146 [] INFO com.alibaba.otter.manager.deployer.OtterManagerLauncher-# # start the manager server.2018-11-19 10 cd 29 usr/local/manager/logs 49.427 [] INFO com.alibaba.otter.manager.deployer.JettyEmbedServer-# # JettyEmbedServer is startup2018-11-19 10 cd 49.427 [] INFO Com.alibaba.otter.manager.deployer.OtterManagerLauncher-# the manager server is running now. [root@wallet02 ~] # mkdir-p / usr/local/node [root@wallet02 ~] # tar zxvf node.deployer-4.2.17.tar.gz-C / usr/local/node [root@wallet02 ~] # cd / usr/local/node/conf/ [root@wallet02 conf] # echo 1 > nid [root@wallet02 conf] # vi otter.properties # # otter arbitrate & node connect manager Configotter.manager.address = 192.168.40.34 main 1099 [root@wallet02 ~] # cd / usr/local/node/bin [root@wallet02 bin] #. / startup.sh [root@wallet02 ~] # cd / usr/local/node/logs/node [root@wallet02 node] # cat node.log 2018-11-19 10 Vera 58 Vera 09.830 [main] INFO com.alibaba.otter.node.deployer.OtterLauncher-INFO # # the otter server is running now. [root@wallet02 ~] # mysql-uroot-pabcd.1234mysql > create user otter@'%' identified by "otter" Query OK, 0 rows affected (0.08 sec) mysql > grant replication slave,replication client on *. * to otter@'%';Query OK, 0 rows affected (0.02 sec) mysql > grant all on tpcc.* to otter@'%' Query OK 0 rows affected (0.03 sec) [root@wallet03 ~] # mkdir-p / usr/local/node [root@wallet03 ~] # tar zxvf node.deployer-4.2.17.tar.gz-C / usr/local/node [root@wallet03 ~] # cd / usr/local/node/conf [root@wallet03 conf] # echo 2 > nid [root@wallet03 conf] # vi otter.properties # # otter arbitrate & node connect manager configotter.manager.address = 192.168.40.34Ze1099 [root@wallet03 ~] # cd / usr/local/node/bin [root@wallet03 bin] #. / startup.sh [root@wallet03 ~] # cd / usr/local/node/logs/node [root@wallet03 node] # cat node.log 2018-11-19 10Gan58 Gang 09.830 [main] INFO com.alibaba.otter.node.deployer.OtterLauncher-INFO # # the otter server is running now. [root@wallet03 ~] # mysql-uroot-pabcd.1234mysql > create user otter@'%' identified by "otter" Query OK, 0 rows affected (0.08 sec) mysql > grant replication slave,replication client on *. * to otter@'%';Query OK, 0 rows affected (0.02 sec) mysql > grant all on tpcc.* to otter@'%';Query OK, 0 rows affected (0.03 sec)

Default user name: admin default password: admin

[root@wallet02 ~] # mysql-uroot-pabcd.1234mysql > show master status +-+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set | +- -+ | mysql-bin.000005 | 100046965 | +- -+ 1 row in set (0.00 sec) mysql > select unix_timestamp (now ()) +-- + | unix_timestamp (now ()) | +-- + | 1556009946 | +-- + 1 row in set (1556009946 sec) {"journalName": "mysql-bin.000005", "position": 100046965, "timestamp": 1556009946}

The above on the MySQL database to achieve remote synchronization tool alibaba otter details, is it helpful for everyone? If you want to know more about it, you can continue to follow our industry information section.

Tags: Tools data database synchronization content value interest password article more section user name article industry information reference help Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Redmi macOS OPPO Reno Xiaomi