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

溫馨提示×

溫馨提示×

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

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

orchestrator+maxscale+mysql5.7GTID主從切換測試過程

發布時間:2020-06-13 10:17:49 來源:網絡 閱讀:498 作者:xingzhehxiang 欄目:MySQL數據庫

1、orchestrator環境請看上一篇:https://blog.51cto.com/860143/2429558

2、maxscale安裝

curl?-sS?https://downloads.mariadb.com/MariaDB/mariadb_repo_setup?|?????sudo?bash?-s?--?--mariadb-maxscale-version="2.3"
yum?search?maxscale
sudo?yum?install?maxscale
maxkeys?/var/lib/maxscale/?
maxpasswd?/var/lib/maxscale/?123456
chown?maxscale.maxscale?/var/lib/maxscale/.secrets
vim?/etc/maxscale.cnf
systemctl?start?maxscale
systemctl?status?maxscale.service
cd?/var/log/maxscale/
vim?maxscale.log?
systemctl?start?maxscale

3、maxscale配置文件

[root@mgr1?maxscale]#?cat?/etc/maxscale.cnf
#?MaxScale?documentation:
#?https://mariadb.com/kb/en/mariadb-enterprise/mariadb-maxscale-23/

#?Global?parameters
#
#?Complete?list?of?configuration?options:
#?https://mariadb.com/kb/en/mariadb-maxscale-23-mariadb-maxscale-configuration-usage-scenarios/

[maxscale]
threads=auto

#?Server?definitions
#
#?Set?the?address?of?the?server?to?the?network
#?address?of?a?MariaDB?server.
#

[server1]
type=server
address=192.168.56.14
port=3306
protocol=MariaDBBackend

[server2]
type=server
address=192.168.56.15
port=3306
protocol=MariaDBBackend

[server3]
type=server
address=192.168.56.16
port=3306
protocol=MariaDBBackend
#?Monitor?for?the?servers
#
#?This?will?keep?MaxScale?aware?of?the?state?of?the?servers.
#?MariaDB?Monitor?documentation:
#?https://mariadb.com/kb/en/mariadb-maxscale-23-mariadb-monitor/

[MariaDB-Monitor]
type=monitor
module=mariadbmon
servers=server1,server2,server3
user=orchestrator
password=0FFC28BC3A8F402F10B0B798E347FD9B
monitor_interval=2000
#?當復制slave全部斷掉時,maxscale仍然可用,將所有的訪問指向master節點
detect_stale_master=true

#?Service?definitions
#
#?Service?Definition?for?a?read-only?service?and
#?a?read/write?splitting?service.
#

#?ReadConnRoute?documentation:
#?https://mariadb.com/kb/en/mariadb-maxscale-23-readconnroute/

[Read-Only-Service]
type=service
router=readconnroute
servers=server1,server2,server3
user=orchestrator
password=0FFC28BC3A8F402F10B0B798E347FD9B
router_options=slave


#?ReadWriteSplit?documentation:
#?https://mariadb.com/kb/en/mariadb-maxscale-23-readwritesplit/

[Read-Write-Service]
type=service
router=readwritesplit
servers=server1,server2,server3
user=orchestrator
password=0FFC28BC3A8F402F10B0B798E347FD9B

#?This?service?enables?the?use?of?the?MaxAdmin?interface
#?MaxScale?administration?guide:
#?https://mariadb.com/kb/en/mariadb-maxscale-23-maxadmin-admin-interface/

[MaxAdmin-Service]
type=service
router=cli

#?Listener?definitions?for?the?services
#
#?These?listeners?represent?the?ports?the
#?services?will?listen?on.
#

[Read-Only-Listener]
type=listener
service=Read-Only-Service
protocol=MariaDBClient
port=4008

[Read-Write-Listener]
type=listener
service=Read-Write-Service
protocol=MariaDBClient
port=4006

[MaxAdmin-Listener]
type=listener
service=MaxAdmin-Service
protocol=maxscaled
socket=default
[root@mgr1?maxscale]#

4、測試過程,把原來的主關閉,并以從庫的方式重啟,下面是maxscale自動發現的過程狀態展示

[root@mgr1?maxscale]#?maxadmin?
MaxScale>?list?servers
Servers.
-------------------+-----------------+-------+-------------+--------------------
Server?????????????|?Address?????????|?Port??|?Connections?|?Status??????????????
-------------------+-----------------+-------+-------------+--------------------
server1????????????|?192.168.56.14???|??3306?|???????????0?|?Slave?of?External?Server,?Running
server2????????????|?192.168.56.15???|??3306?|???????????0?|?Slave?of?External?Server,?Running
server3????????????|?192.168.56.16???|??3306?|???????????0?|?Master,?Running
-------------------+-----------------+-------+-------------+--------------------
MaxScale>?list?servers
Servers.
-------------------+-----------------+-------+-------------+--------------------
Server?????????????|?Address?????????|?Port??|?Connections?|?Status??????????????
-------------------+-----------------+-------+-------------+--------------------
server1????????????|?192.168.56.14???|??3306?|???????????0?|?Master,?Running
server2????????????|?192.168.56.15???|??3306?|???????????0?|?Slave?of?External?Server,?Running
server3????????????|?192.168.56.16???|??3306?|???????????0?|?Down
-------------------+-----------------+-------+-------------+--------------------
MaxScale>?list?servers
Servers.
-------------------+-----------------+-------+-------------+--------------------
Server?????????????|?Address?????????|?Port??|?Connections?|?Status??????????????
-------------------+-----------------+-------+-------------+--------------------
server1????????????|?192.168.56.14???|??3306?|???????????0?|?Master,?Running
server2????????????|?192.168.56.15???|??3306?|???????????0?|?Slave?of?External?Server,?Running
server3????????????|?192.168.56.16???|??3306?|???????????0?|?Down
-------------------+-----------------+-------+-------------+--------------------
MaxScale>?list?servers
Servers.
-------------------+-----------------+-------+-------------+--------------------
Server?????????????|?Address?????????|?Port??|?Connections?|?Status??????????????
-------------------+-----------------+-------+-------------+--------------------
server1????????????|?192.168.56.14???|??3306?|???????????0?|?Master,?Running
server2????????????|?192.168.56.15???|??3306?|???????????0?|?Slave?of?External?Server,?Running
server3????????????|?192.168.56.16???|??3306?|???????????0?|?Down
-------------------+-----------------+-------+-------------+--------------------
MaxScale>?list?servers
Servers.
-------------------+-----------------+-------+-------------+--------------------
Server?????????????|?Address?????????|?Port??|?Connections?|?Status??????????????
-------------------+-----------------+-------+-------------+--------------------
server1????????????|?192.168.56.14???|??3306?|???????????0?|?Master,?Running
server2????????????|?192.168.56.15???|??3306?|???????????0?|?Slave?of?External?Server,?Running
server3????????????|?192.168.56.16???|??3306?|???????????0?|?Slave?of?External?Server,?Running
-------------------+-----------------+-------+-------------+--------------------
MaxScale>?list?servers
Servers.
-------------------+-----------------+-------+-------------+--------------------
Server?????????????|?Address?????????|?Port??|?Connections?|?Status??????????????
-------------------+-----------------+-------+-------------+--------------------
server1????????????|?192.168.56.14???|??3306?|???????????0?|?Master,?Running
server2????????????|?192.168.56.15???|??3306?|???????????0?|?Slave?of?External?Server,?Running
server3????????????|?192.168.56.16???|??3306?|???????????0?|?Slave?of?External?Server,?Running
-------------------+-----------------+-------+-------------+--------------------
MaxScale>?list?servers
Servers.
-------------------+-----------------+-------+-------------+--------------------
Server?????????????|?Address?????????|?Port??|?Connections?|?Status??????????????
-------------------+-----------------+-------+-------------+--------------------
server1????????????|?192.168.56.14???|??3306?|???????????0?|?Master,?Running
server2????????????|?192.168.56.15???|??3306?|???????????0?|?Slave?of?External?Server,?Running
server3????????????|?192.168.56.16???|??3306?|???????????0?|?Slave?of?External?Server,?Running
-------------------+-----------------+-------+-------------+--------------------
MaxScale>?list?servers
Servers.
-------------------+-----------------+-------+-------------+--------------------
Server?????????????|?Address?????????|?Port??|?Connections?|?Status??????????????
-------------------+-----------------+-------+-------------+--------------------
server1????????????|?192.168.56.14???|??3306?|???????????0?|?Master,?Running
server2????????????|?192.168.56.15???|??3306?|???????????0?|?Slave?of?External?Server,?Running
server3????????????|?192.168.56.16???|??3306?|???????????0?|?Slave?of?External?Server,?Running
-------------------+-----------------+-------+-------------+--------------------
MaxScale>?list?servers


向AI問一下細節

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

AI

张家川| 景东| 广德县| 静安区| 珲春市| 乳山市| 樟树市| 太康县| 微山县| 榆树市| 怀柔区| 河源市| 滁州市| 南开区| 黄冈市| 黎城县| 内江市| 富平县| 绥芬河市| 西贡区| 尉氏县| 甘肃省| 海安县| 芦山县| 海兴县| 新昌县| 西华县| 大埔县| 梅州市| 金阳县| 松潘县| 屯门区| 福贡县| 观塘区| 镇康县| 五指山市| 府谷县| 从江县| 安丘市| 霍山县| 姜堰市|