真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

trovemysqlreplica使用-創(chuàng)新互聯(lián)

1、trove mysql replica 一些限制

成都創(chuàng)新互聯(lián)于2013年開(kāi)始,先為高州等服務(wù)建站,高州等地企業(yè),進(jìn)行企業(yè)商務(wù)咨詢服務(wù)。為高州企業(yè)網(wǎng)站制作PC+手機(jī)+微官網(wǎng)三網(wǎng)同步一站式服務(wù)解決您的所有建站問(wèn)題。
  • trove 可以同時(shí)支持binlog replica 和gtid replica

  • gtid 需要mysql5.6及其以上版本

  • newton trove 對(duì)mysql 的 binlog replica 支持不是很好

  • newton trove 對(duì)mysql的gtid replica 可以正常工作

  • newton trove 可以創(chuàng)建 mysql5.5 binlog replica

  • detach-replica:Mysql 5.5 binlog 模式可以正常工作

  • eject-replica-source:對(duì)binlog復(fù)制模式mysql5.5報(bào)錯(cuò),binlog模式報(bào)錯(cuò)信息:Could not locate column in row for column 'Master_UUID'

  • promote-to-replica-source:Mysql5.5 binlog 模式報(bào)錯(cuò),操作中會(huì)用到gtid

2、與replica 相關(guān)的命令

trove create # 創(chuàng)建復(fù)制 trove detach-replica # 從復(fù)制中移除slave trove promote-to-replica-source #master,slave都存活的情況下,將指定的slave提升為master,原master降為slave trove eject-replica-source # 當(dāng)master失去心跳,可以移除master,trove在slave選擇一個(gè)合適的節(jié)點(diǎn)作為master

3、創(chuàng)建復(fù)制

trove create ab 6 --size 5 --databases myDB \     --users userA:password --datastore_version mysql-5.6 \     --datastore mysql trove create ab-slave1 6 --size 5 --replica_of ab --replica_count 2 \     --datastore_version mysql-5.6     --datastore mysql

4、分離slave

trove show ab-slave2-2 +-------------------+--------------------------------------+ | Property          | Value                                | +-------------------+--------------------------------------+ | created           | 2017-03-31T03:29:20                  | | datastore         | mysql                                | | datastore_version | mysql-5.6                            | | flavor            | 6                                    | | id                | caa908f1-5e14-4c65-ac0e-a9ba26536107 | | ip                | 172.168.10.6                         | | name              | ab-slave2-2                          | | replica_of        | 3d39a475-3277-4d24-9467-ebc254e9316f | | status            | ACTIVE                               | | updated           | 2017-03-31T06:19:30                  | | volume            | 5                                    | | volume_used       | 0.14                                 | +-------------------+--------------------------------------+ trove detach-replica  ab-slave2-2 trove show  ab-slave2-2 +-------------------+--------------------------------------+ | Property          | Value                                | +-------------------+--------------------------------------+ | created           | 2017-03-31T03:29:20                  | | datastore         | mysql                                | | datastore_version | mysql-5.6                            | | flavor            | 6                                    | | id                | caa908f1-5e14-4c65-ac0e-a9ba26536107 | | ip                | 172.168.10.6                         | | name              | ab-slave2-2                          | | status            | ACTIVE                               | | updated           | 2017-03-31T06:28:45                  | | volume            | 5                                    | | volume_used       | 0.14                                 | +-------------------+--------------------------------------+

5、提升slave為master

trove show ab-slave3-1 +-------------------+--------------------------------------+ | Property          | Value                                | +-------------------+--------------------------------------+ | created           | 2017-03-31T03:36:16                  | | datastore         | mysql                                | | datastore_version | mysql-5.6                            | | flavor            | 6                                    | | id                | f303fc8f-819b-47b5-b33a-38184c8aff90 | | ip                | 172.168.10.14                        | | name              | ab-slave3-1                          | | replica_of        | 3d39a475-3277-4d24-9467-ebc254e9316f | | status            | ACTIVE                               | | updated           | 2017-03-31T06:19:30                  | | volume            | 5                                    | | volume_used       | 0.14                                 | +-------------------+--------------------------------------+ trove promote-to-replica-source ab-slave3-1 # ab-slave3-1已提升為master trove show ab-slave3-1 +-------------------+----------------------------------------------------------------------------+ | Property          | Value                                                                      | +-------------------+----------------------------------------------------------------------------+ | created           | 2017-03-31T03:36:16                                                        | | datastore         | mysql                                                                      | | datastore_version | mysql-5.6                                                                  | | flavor            | 6                                                                          | | id                | f303fc8f-819b-47b5-b33a-38184c8aff90                                       | | ip                | 172.168.10.14                                                              | | name              | ab-slave3-1                                                                | | replicas          | 3d39a475-3277-4d24-9467-ebc254e9316f, f4b3be64-c204-439d-a9c4-e28cb543a3b9 | | status            | ACTIVE                                                                     | | updated           | 2017-03-31T06:33:39                                                        | | volume            | 5                                                                          | | volume_used       | 0.14                                                                       | +-------------------+----------------------------------------------------------------------------+ # master已降級(jí)為slave trove show 3d39a475-3277-4d24-9467-ebc254e9316f +-------------------+--------------------------------------+ | Property          | Value                                | +-------------------+--------------------------------------+ | created           | 2017-03-31T06:14:35                  | | datastore         | mysql                                | | datastore_version | mysql-5.6                            | | flavor            | 6                                    | | id                | 3d39a475-3277-4d24-9467-ebc254e9316f | | ip                | 172.168.10.8                         | | name              | ab                                   | | replica_of        | f303fc8f-819b-47b5-b33a-38184c8aff90 | | status            | ACTIVE                               | | updated           | 2017-03-31T06:33:39                  | | volume            | 5                                    | | volume_used       | 0.14                                 | +-------------------+--------------------------------------+

6、移除master

移除master需要在master已經(jīng)失去心跳的情況下做,如果master尚有心跳是無(wú)法移除master的

可以通過(guò)停止master上的trove-guestagent模擬master失去心跳

service trove-guestagent stop trove eject-replica-source

另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無(wú)理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。


網(wǎng)站欄目:trovemysqlreplica使用-創(chuàng)新互聯(lián)
標(biāo)題鏈接:http://weahome.cn/article/cdijed.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部