91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

trove mysql replica 使用

發布時間:2020-06-30 02:24:21 來源:網絡 閱讀:1293 作者:757781091 欄目:MySQL數據庫

1、trove mysql replica 一些限制

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

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

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

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

  • newton trove 可以創建 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 # 創建復制
trove detach-replica # 從復制中移除slave
trove promote-to-replica-source #master,slave都存活的情況下,將指定的slave提升為master,原master降為slave
trove eject-replica-source # 當master失去心跳,可以移除master,trove在slave選擇一個合適的節點作為master

3、創建復制

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已經失去心跳的情況下做,如果master尚有心跳是無法移除master的

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

service trove-guestagent stop
trove eject-replica-source


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

绥中县| 新龙县| 长沙县| 祁东县| 伊金霍洛旗| 阳新县| 中方县| 郁南县| 嘉善县| 五峰| 安龙县| 老河口市| 嵊泗县| 勐海县| 中牟县| 那曲县| 信阳市| 天峻县| 崇义县| 田东县| 中西区| 抚顺县| 武冈市| 昌邑市| 哈尔滨市| 衡阳市| 扶绥县| 黄平县| 六枝特区| 耿马| 合江县| 婺源县| 清流县| 保德县| 乐亭县| 新源县| 威信县| 顺昌县| 彭泽县| 台北县| 蓬莱市|