濮阳杆衣贸易有限公司

主頁 > 知識(shí)庫 > 詳解MySQL 5.7 MGR單主確定主節(jié)點(diǎn)方法

詳解MySQL 5.7 MGR單主確定主節(jié)點(diǎn)方法

熱門標(biāo)簽:悟空科技電話機(jī)器人 電銷卡外呼系統(tǒng)供應(yīng)商 美國反騷擾電話機(jī)器人 怎么在地圖標(biāo)注位置生成圖片 400電話可以免費(fèi)申請(qǐng)嗎 福建外呼系統(tǒng)定制化 真人語音電話機(jī)器人 騰訊地圖標(biāo)注提升 銅陵防封電銷卡

我們行MGR年底要上線了,每天都要看官方文檔學(xué)習(xí),做測試,堅(jiān)持每天寫一個(gè)小知識(shí)點(diǎn),有想一起學(xué)習(xí)的么~

MySQL 5.7 MGR單主確定主節(jié)點(diǎn)是哪個(gè),我們可以通過成員ID來判斷,然后結(jié)合read_only參數(shù)來確認(rèn)。

[root@localhost ~]# mysql -uroot -p -P 3306 -h 127.0.0.1
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 857246
Server version: 5.7.26-29-log Percona Server (GPL)

Copyright (c) 2009-2019 Percona LLC and/or its affiliates
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> status
--------------
mysql Ver 14.14 Distrib 5.7.26-29, for Linux (x86_64) using EditLine wrapper

Connection id:   857246
Current database:  
Current user:    root@127.0.0.1
SSL:      Not in use
Current pager:   stdout
Using outfile:   ''
Using delimiter:  ;
Server version:   5.7.26-29-log Percona Server (GPL)
Protocol version:  10
Connection:   127.0.0.1 via TCP/IP
Server characterset:  utf8mb4
Db   characterset:  utf8mb4
Client characterset:  utf8
Conn. characterset:  utf8
TCP port:    3306
Uptime:     39 days 8 hours 53 min 39 sec

Threads: 4 Questions: 4989552 Slow queries: 731837 Opens: 930 Flush tables: 1 Open tables: 924 Queries per second avg: 1.466
--------------

mysql> SHOW STATUS LIKE 'group_replication_primary_member';
+----------------------------------+--------------------------------------+
| Variable_name          | Value                |
+----------------------------------+--------------------------------------+
| group_replication_primary_member | 59d7f183-b8f6-11e9-863b-005056875165 |
+----------------------------------+--------------------------------------+
1 row in set (0.00 sec)

mysql> select * from performance_schema.replication_group_members;
+---------------------------+--------------------------------------+-------------+-------------+--------------+
| CHANNEL_NAME       | MEMBER_ID              | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE |
+---------------------------+--------------------------------------+-------------+-------------+--------------+
| group_replication_applier | 500dd0aa-b8f6-11e9-85ba-005056875a61 | 196.55.7.37 |    3306 | ONLINE    |
| group_replication_applier | 59d7f183-b8f6-11e9-863b-005056875165 | 196.55.7.36 |    3306 | ONLINE    |
| group_replication_applier | 69e1c26d-b8f6-11e9-91c1-00505687032a | 196.55.7.38 |    3306 | ONLINE    |
+---------------------------+--------------------------------------+-------------+-------------+--------------+
3 rows in set (0.00 sec)

mysql> show variables like '%read_only';
+-----------------------+-------+
| Variable_name     | Value |
+-----------------------+-------+
| innodb_read_only   | OFF  |
| read_only       | OFF  |
| super_read_only    | OFF  |
| transaction_read_only | OFF  |
| tx_read_only     | OFF  |
+-----------------------+-------+
5 rows in set (0.01 sec)

mysql> 

以上就是本文的全部內(nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

您可能感興趣的文章:
  • MySQL 8.0.15配置MGR單主多從的方法
  • MySQL MGR 有哪些優(yōu)點(diǎn)
  • mysql MGR 單主多主模式切換知識(shí)點(diǎn)詳解
  • mysql 8.0.18 mgr 搭建及其切換功能
  • MySQL 8.0.18使用clone plugin重建MGR的實(shí)現(xiàn)
  • MySQL MGR搭建過程中常遇見的問題及解決辦法

標(biāo)簽:武威 臨汾 烏海 湖北 聊城 云浮 湖南 白銀

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《詳解MySQL 5.7 MGR單主確定主節(jié)點(diǎn)方法》,本文關(guān)鍵詞  詳解,MySQL,5.7,MGR,單主,確定,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《詳解MySQL 5.7 MGR單主確定主節(jié)點(diǎn)方法》相關(guān)的同類信息!
  • 本頁收集關(guān)于詳解MySQL 5.7 MGR單主確定主節(jié)點(diǎn)方法的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    郑州市| 酒泉市| 元朗区| 新建县| 山东省| 利辛县| 珠海市| 罗山县| 五台县| 谢通门县| 买车| 商水县| 中阳县| 永兴县| 晋州市| 德格县| 山阴县| 上思县| 西吉县| 永兴县| 镇安县| 林州市| 清河县| 井冈山市| 旬阳县| 闽侯县| 连平县| 大姚县| 南郑县| 建平县| 客服| 嘉义市| 东莞市| 凤台县| 平谷区| 康马县| 扎赉特旗| 江油市| 枝江市| 宁安市| 乡宁县|