您好,登錄后才能下訂單哦!
這篇文章將為大家詳細(xì)講解有關(guān)MySQL高可用工具Orchestrator怎么進(jìn)行raft多節(jié)點(diǎn)模式安裝,文章內(nèi)容質(zhì)量較高,因此小編分享給大家做個(gè)參考,希望大家閱讀完這篇文章后對(duì)相關(guān)知識(shí)有一定的了解。
環(huán) 境
CREATE USER 'orchestrator'@'127.0.0.1' IDENTIFIED BY 'orchestrator'; GRANT ALL PRIVILEGES ON `orchestrator`.* TO 'orchestrator'@'127.0.0.1';
這里元數(shù)據(jù)庫MySQL和orchestrator在同一臺(tái)機(jī)器上,所以創(chuàng)建賬號(hào)的時(shí)候用的'127.0.0.1',如果不在同一臺(tái)機(jī)器上,將IP換成orchestrator所在機(jī)器ip。
密碼按需修改
tar -xvzf orchestrator-3.1.2-linux-amd64.tar.gz -C /
[root@10-10-30-150 orchestrator]# ls orchestrator orchestrator-sample-sqlite.conf.json orchestrator-sample.conf.json resources [root@10-10-30-150 orchestrator]# cp orchestrator-sample.conf.json /etc/orchestrator.conf.json
CREATE USER 'orchestrator'@'orch_host' IDENTIFIED BY 'orch_topology_password';
GRANT SUPER, PROCESS, REPLICATION SLAVE, RELOAD ON *.* TO 'orchestrator'@'orch_host';
GRANT SELECT ON mysql.slave_master_info TO 'orchestrator'@'orch_host';
GRANT SELECT ON ndbinfo.processes TO 'orchestrator'@'orch_host'; -- Only for NDB Cluster
其中,將'orch_host' 改成對(duì)應(yīng)orch所在服務(wù)器的ip,'orch_topology_password'改成合適的密碼。這里orch_host是10.10.30.%,將密碼改為orchestrator。
/// 配置orchestrator后端元數(shù)據(jù)庫信息 ... "MySQLOrchestratorHost": "127.0.0.1", "MySQLOrchestratorPort": 3306, "MySQLOrchestratorDatabase": "orchestrator", "MySQLOrchestratorUser": "orchestrator", "MySQLOrchestratorPassword": "orchestrator", ... /// 配置orchestrator監(jiān)控的目標(biāo)數(shù)據(jù)庫信息 "MySQLTopologyUser": "orchestrator", "MySQLTopologyPassword": "orchestrator", ... /// 配置raft的相關(guān)參數(shù) "RaftEnabled": true, "RaftDataDir": "/var/lib/orchestrator", "RaftBind": "10.10.30.150", #本機(jī)ip或者h(yuǎn)ostname "DefaultRaftPort": 10008, #raft端口 "RaftNodes": [ "10.10.30.150", "10.10.30.128", "10.10.30.145" ]
cd /usr/local/orchestrator && ./orchestrator --config=/etc/orchestrator.conf.json http > /usr/local/orchestrator/orchestrator.log 2>&1 &
這里假定環(huán)境:
10.10.30.170是從庫
10.10.30.130是主庫
如上圖所示
3.1.2版本的orchestrator在通過從庫10.10.30.170發(fā)現(xiàn)主庫的時(shí)候,通過show slave status得到的master_host雖然是10.10.30.130,但是頁面上顯示的卻是10.10.30.130這個(gè)ip對(duì)應(yīng)的hostname:10-10-30-130,如下圖所示:
因此,orchestrator會(huì)報(bào)10-10-30-130找不到:
2019-11-27 13:48:29 ERROR dial tcp: lookup 10-10-30-130 on 223.5.5.5:53: no such host
10.10.30.130 10-10-30-130 10.10.30.183 10-10-30-183 10.10.30.170 10-10-30-170
關(guān)于MySQL高可用工具Orchestrator怎么進(jìn)行raft多節(jié)點(diǎn)模式安裝就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,可以學(xué)到更多知識(shí)。如果覺得文章不錯(cuò),可以把它分享出去讓更多的人看到。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請(qǐng)聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。