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

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

trovemysqlreplica使用

1、trove MySQL replica 一些限制

站在用戶的角度思考問題,與客戶深入溝通,找到安寧網(wǎng)站設計與安寧網(wǎng)站推廣的解決方案,憑借多年的經(jīng)驗,讓設計與互聯(lián)網(wǎng)技術結(jié)合,創(chuàng)造個性化、用戶體驗好的作品,建站類型包括:網(wǎng)站設計、成都做網(wǎng)站、企業(yè)官網(wǎng)、英文網(wǎng)站、手機端網(wǎng)站、網(wǎng)站推廣、域名注冊虛擬主機、企業(yè)郵箱。業(yè)務覆蓋安寧地區(qū)。

  • trove 可以同時支持binlog replica 和gtid replica

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

  • newton trove 對mysql 的 binlog replica 支持不是很好

  • newton trove 對mysql的gtid replica 可以正常工作

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

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

  • eject-replica-source:對binlog復制模式mysql5.5報錯,binlog模式報錯信息:Could not locate column in row for column 'Master_UUID'

  • promote-to-replica-source:Mysql5.5 binlog 模式報錯,操作中會用到gtid

2、與replica 相關的命令

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

3、創(chuàng)建復制

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已降級為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尚有心跳是無法移除master的

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

service trove-guestagent stop
trove eject-replica-source

本文名稱:trovemysqlreplica使用
分享地址:http://weahome.cn/article/jsigii.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部