<span id="mktg5"></span>

<i id="mktg5"><meter id="mktg5"></meter></i>

        <label id="mktg5"><meter id="mktg5"></meter></label>
        最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
        問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
        當前位置: 首頁 - 科技 - 知識百科 - 正文

        MHA+非root用戶SSH等效性配置

        來源:懂視網 責編:小采 時間:2020-11-09 14:48:51
        文檔

        MHA+非root用戶SSH等效性配置

        MHA+非root用戶SSH等效性配置:環境:CentOS5.8 MySQL5.5.17 實驗:搭建MHA高可用架構(非root用戶SSH等效性配置)SSH等效性用戶配置的是:concert 端口:1314 MHA配置文件 [concert@mhamanager mha]$ more /etc/masterha_default.cnf [server def
        推薦度:
        導讀MHA+非root用戶SSH等效性配置:環境:CentOS5.8 MySQL5.5.17 實驗:搭建MHA高可用架構(非root用戶SSH等效性配置)SSH等效性用戶配置的是:concert 端口:1314 MHA配置文件 [concert@mhamanager mha]$ more /etc/masterha_default.cnf [server def

        環境:CentOS5.8 MySQL5.5.17 實驗:搭建MHA高可用架構(非root用戶SSH等效性配置)SSH等效性用戶配置的是:concert 端口:1314 MHA配置文件 [concert@mhamanager mha]$ more /etc/masterha_default.cnf [server default] user = root password = mysql_admi

        環境:CentOS5.8

        MySQL5.5.17

        實驗:搭建MHA高可用架構(非root用戶SSH等效性配置)SSH等效性用戶配置的是:concert 端口:1314

        MHA配置文件

        [concert@mhamanager mha]$ more /etc/masterha_default.cnf
        [server default]
        user = root
        password = mysql_admin
        ssh_user = concert
        ssh_port = 1314
        repl_user = repl
        repl_password = repl_pwd
        ping_interval = 3
        ping_type = select

        [concert@mhamanager mha]$ more /etc/appl.cnf
        [server default]
        manager_workdir = /mha/appl
        manager_log = /mha/appl/manager.log
        remote_workdir = /mha/appl

        [server1]
        hostname = 192.168.66.88
        master_binlog_dir = /data/lib/mysql
        candidate_master = 1

        [server2]
        hostname = 192.168.66.89
        master_binlog_dir = /data/lib/mysql
        candidate_master = 1

        [server3]
        hostname = 192.168.66.120
        no_master = 1
        port = 3307

        問題:配置好非root用戶SSH等效性后,通過masterha_check_ssh檢查沒有問題

        [concert@mhamanager ~]$ /usr/bin/masterha_check_ssh --conf=/etc/appl.cnf
        Tue Sep 2 15:06:01 2014 - [info] Reading default configuratoins from /etc/masterha_default.cnf..
        Tue Sep 2 15:06:01 2014 - [info] Reading application default configurations from /etc/appl.cnf..
        Tue Sep 2 15:06:01 2014 - [info] Reading server configurations from /etc/appl.cnf..
        Tue Sep 2 15:06:01 2014 - [info] Starting SSH connection tests..
        Tue Sep 2 15:06:01 2014 - [debug]
        Tue Sep 2 15:06:01 2014 - [debug] Connecting via SSH from concert@192.168.66.88(192.168.66.88:1314) to concert@192.168.66.89(192.168.66.89:1314)..
        Tue Sep 2 15:06:01 2014 - [debug] ok.
        Tue Sep 2 15:06:01 2014 - [debug] Connecting via SSH from concert@192.168.66.88(192.168.66.88:1314) to concert@192.168.66.120(192.168.66.120:1314)..
        Tue Sep 2 15:06:01 2014 - [debug] ok.
        Tue Sep 2 15:06:02 2014 - [debug]
        Tue Sep 2 15:06:01 2014 - [debug] Connecting via SSH from concert@192.168.66.89(192.168.66.89:1314) to concert@192.168.66.88(192.168.66.88:1314)..
        Tue Sep 2 15:06:01 2014 - [debug] ok.
        Tue Sep 2 15:06:01 2014 - [debug] Connecting via SSH from concert@192.168.66.89(192.168.66.89:1314) to concert@192.168.66.120(192.168.66.120:1314)..
        Tue Sep 2 15:06:02 2014 - [debug] ok.
        Tue Sep 2 15:06:02 2014 - [debug]
        Tue Sep 2 15:06:02 2014 - [debug] Connecting via SSH from concert@192.168.66.120(192.168.66.120:1314) to concert@192.168.66.88(192.168.66.88:1314)..
        Tue Sep 2 15:06:02 2014 - [debug] ok.
        Tue Sep 2 15:06:02 2014 - [debug] Connecting via SSH from concert@192.168.66.120(192.168.66.120:1314) to concert@192.168.66.89(192.168.66.89:1314)..
        Tue Sep 2 15:06:02 2014 - [debug] ok.
        Tue Sep 2 15:06:02 2014 - [info] All SSH connection tests passed successfully.

        但通過masterha_check_repl檢查則不通過

        [concert@mhamanager ~]$ /usr/bin/masterha_check_repl --conf=/etc/appl.cnf
        Tue Sep 2 17:10:08 2014 - [info] Reading default configuratoins from /etc/masterha_default.cnf..
        Tue Sep 2 17:10:08 2014 - [info] Reading application default configurations from /etc/appl.cnf..
        Tue Sep 2 17:10:08 2014 - [info] Reading server configurations from /etc/appl.cnf..
        Tue Sep 2 17:10:08 2014 - [info] MHA::MasterMonitor version 0.55.
        Tue Sep 2 17:10:08 2014 - [info] Dead Servers:
        Tue Sep 2 17:10:08 2014 - [info] Alive Servers:
        Tue Sep 2 17:10:08 2014 - [info] 192.168.66.88(192.168.66.88:3306)
        Tue Sep 2 17:10:08 2014 - [info] 192.168.66.89(192.168.66.89:3306)
        Tue Sep 2 17:10:08 2014 - [info] 192.168.66.120(192.168.66.120:3307)
        Tue Sep 2 17:10:08 2014 - [info] Alive Slaves:
        Tue Sep 2 17:10:08 2014 - [info] 192.168.66.89(192.168.66.89:3306) Version=5.5.17-log (oldest major version between slaves) log-bin:enabled
        Tue Sep 2 17:10:08 2014 - [info] Replicating from 192.168.66.88(192.168.66.88:3306)
        Tue Sep 2 17:10:08 2014 - [info] Primary candidate for the new Master (candidate_master is set)
        Tue Sep 2 17:10:08 2014 - [info] 192.168.66.120(192.168.66.120:3307) Version=5.5.17-log (oldest major version between slaves) log-bin:enabled
        Tue Sep 2 17:10:08 2014 - [info] Replicating from 192.168.66.88(192.168.66.88:3306)
        Tue Sep 2 17:10:08 2014 - [info] Not candidate for the new Master (no_master is set)
        Tue Sep 2 17:10:08 2014 - [info] Current Alive Master: 192.168.66.88(192.168.66.88:3306)
        Tue Sep 2 17:10:08 2014 - [info] Checking slave configurations..
        Tue Sep 2 17:10:08 2014 - [info] Checking replication filtering settings..
        Tue Sep 2 17:10:08 2014 - [info] binlog_do_db= , binlog_ignore_db=
        Tue Sep 2 17:10:08 2014 - [info] Replication filtering check ok.
        Tue Sep 2 17:10:08 2014 - [info] Starting SSH connection tests..
        Tue Sep 2 17:10:10 2014 - [error][/usr/lib/perl5/vendor_perl/MHA/MasterMonitor.pm, ln386] Error happend on checking configurations. SSH Configuration Check Failed!
        at /usr/lib/perl5/vendor_perl/MHA/MasterMonitor.pm line 341
        Tue Sep 2 17:10:10 2014 - [error][/usr/lib/perl5/vendor_perl/MHA/MasterMonitor.pm, ln482] Error happened on monitoring servers.
        Tue Sep 2 17:10:10 2014 - [info] Got exit code 1 (Not master dead).

        MySQL Replication Health is NOT OK!

        解決方案:

        1、增加remote_workdir(運行MySQL實例的服務器)的工作目錄權限,其中會生成日志文件,將該目錄擁有者設為concert

        [root@master88 ~]# chown -R concert:concert /mha/

        2、添加concert為MySQL同組用戶,使其有讀取MySQL binary/relay log文件和relay_log.info文件的權限,以及日志目錄的寫權限

        [root@bakmaster ~]# usermod -g mysql concert

        再次檢查

        [concert@mhamanager mha]$ /usr/bin/masterha_check_repl --conf=/etc/appl.cnf
        Wed Sep 3 22:27:41 2014 - [info] Reading default configuratoins from /etc/masterha_default.cnf..
        Wed Sep 3 22:27:41 2014 - [info] Reading application default configurations from /etc/appl.cnf..
        Wed Sep 3 22:27:41 2014 - [info] Reading server configurations from /etc/appl.cnf..
        Wed Sep 3 22:27:41 2014 - [info] MHA::MasterMonitor version 0.55.
        Wed Sep 3 22:27:41 2014 - [info] Dead Servers:
        Wed Sep 3 22:27:41 2014 - [info] Alive Servers:
        Wed Sep 3 22:27:41 2014 - [info] 192.168.66.88(192.168.66.88:3306)
        Wed Sep 3 22:27:41 2014 - [info] 192.168.66.89(192.168.66.89:3306)
        Wed Sep 3 22:27:41 2014 - [info] 192.168.66.120(192.168.66.120:3307)
        Wed Sep 3 22:27:41 2014 - [info] Alive Slaves:
        Wed Sep 3 22:27:41 2014 - [info] 192.168.66.89(192.168.66.89:3306) Version=5.5.17-log (oldest major version between slaves) log-bin:enabled
        Wed Sep 3 22:27:41 2014 - [info] Replicating from 192.168.66.88(192.168.66.88:3306)
        Wed Sep 3 22:27:41 2014 - [info] Primary candidate for the new Master (candidate_master is set)
        Wed Sep 3 22:27:41 2014 - [info] 192.168.66.120(192.168.66.120:3307) Version=5.5.17-log (oldest major version between slaves) log-bin:enabled
        Wed Sep 3 22:27:41 2014 - [info] Replicating from 192.168.66.88(192.168.66.88:3306)
        Wed Sep 3 22:27:41 2014 - [info] Not candidate for the new Master (no_master is set)
        Wed Sep 3 22:27:41 2014 - [info] Current Alive Master: 192.168.66.88(192.168.66.88:3306)
        Wed Sep 3 22:27:41 2014 - [info] Checking slave configurations..
        Wed Sep 3 22:27:41 2014 - [info] Checking replication filtering settings..
        Wed Sep 3 22:27:41 2014 - [info] binlog_do_db= , binlog_ignore_db=
        Wed Sep 3 22:27:41 2014 - [info] Replication filtering check ok.
        Wed Sep 3 22:27:41 2014 - [info] Starting SSH connection tests..
        Wed Sep 3 22:27:42 2014 - [info] All SSH connection tests passed successfully.
        Wed Sep 3 22:27:42 2014 - [info] Checking MHA Node version..
        Wed Sep 3 22:27:43 2014 - [info] Version check ok.
        Wed Sep 3 22:27:43 2014 - [info] Checking SSH publickey authentication settings on the current master..
        Wed Sep 3 22:27:43 2014 - [info] HealthCheck: SSH to 192.168.66.88 is reachable.
        Wed Sep 3 22:27:43 2014 - [info] Master MHA Node version is 0.54.
        Wed Sep 3 22:27:43 2014 - [info] Checking recovery script configurations on the current master..
        Wed Sep 3 22:27:43 2014 - [info] Executing command: save_binary_logs --command=test --start_pos=4 --binlog_dir=/data/lib/mysql --output_file=/mha/appl/save_binary_logs_test --manager_version=0.55 --start_file=mysql-bin.000004
        Wed Sep 3 22:27:43 2014 - [info] Connecting to concert@192.168.66.88(192.168.66.88)..
        Creating /mha/appl if not exists.. ok.
        Checking output directory is accessible or not..
        ok.
        Binlog found at /data/lib/mysql, up to mysql-bin.000004
        Wed Sep 3 22:27:43 2014 - [info] Master setting check done.
        Wed Sep 3 22:27:43 2014 - [info] Checking SSH publickey authentication and checking recovery script configurations on all alive slave servers..
        Wed Sep 3 22:27:43 2014 - [info] Executing command : apply_diff_relay_logs --command=test --slave_user='root' --slave_host=192.168.66.89 --slave_ip=192.168.66.89 --slave_port=3306 --workdir=/mha/appl --target_version=5.5.17-log --manager_version=0.55 --relay_log_info=/data/lib/mysql/relay-log.info --relay_dir=/data/lib/mysql/ --slave_pass=xxx
        Wed Sep 3 22:27:43 2014 - [info] Connecting to concert@192.168.66.89(192.168.66.89:1314)..
        Checking slave recovery environment settings..
        Opening /data/lib/mysql/relay-log.info ... ok.
        Relay log found at /data/lib/mysql, up to mysql-relay-bin.000006
        Temporary relay log file is /data/lib/mysql/mysql-relay-bin.000006
        Testing mysql connection and privileges.. done.
        Testing mysqlbinlog output.. done.
        Cleaning up test file(s).. done.
        Wed Sep 3 22:27:43 2014 - [info] Executing command : apply_diff_relay_logs --command=test --slave_user='root' --slave_host=192.168.66.120 --slave_ip=192.168.66.120 --slave_port=3307 --workdir=/mha/appl --target_version=5.5.17-log --manager_version=0.55 --relay_log_info=/data/lib/mysqlb/relay-log.info --relay_dir=/data/lib/mysqlb/ --slave_pass=xxx
        Wed Sep 3 22:27:43 2014 - [info] Connecting to concert@192.168.66.120(192.168.66.120:1314)..
        Checking slave recovery environment settings..
        Opening /data/lib/mysqlb/relay-log.info ... ok.
        Relay log found at /data/lib/mysqlb, up to mysql-relay-bin.000005
        Temporary relay log file is /data/lib/mysqlb/mysql-relay-bin.000005
        Testing mysql connection and privileges.. done.
        Testing mysqlbinlog output.. done.
        Cleaning up test file(s).. done.
        Wed Sep 3 22:27:44 2014 - [info] Slaves settings check done.
        Wed Sep 3 22:27:44 2014 - [info]
        192.168.66.88 (current master)
        +--192.168.66.89
        +--192.168.66.120

        Wed Sep 3 22:27:44 2014 - [info] Checking replication health on 192.168.66.89..
        Wed Sep 3 22:27:44 2014 - [info] ok.
        Wed Sep 3 22:27:44 2014 - [info] Checking replication health on 192.168.66.120..
        Wed Sep 3 22:27:44 2014 - [info] ok.
        Wed Sep 3 22:27:44 2014 - [warning] master_ip_failover_script is not defined.
        Wed Sep 3 22:27:44 2014 - [warning] shutdown_script is not defined.
        Wed Sep 3 22:27:44 2014 - [info] Got exit code 0 (Not master dead).

        MySQL Replication Health is OK.

        OK!問題解決。

        聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

        文檔

        MHA+非root用戶SSH等效性配置

        MHA+非root用戶SSH等效性配置:環境:CentOS5.8 MySQL5.5.17 實驗:搭建MHA高可用架構(非root用戶SSH等效性配置)SSH等效性用戶配置的是:concert 端口:1314 MHA配置文件 [concert@mhamanager mha]$ more /etc/masterha_default.cnf [server def
        推薦度:
        標簽: 用戶 root 配置
        • 熱門焦點

        最新推薦

        猜你喜歡

        熱門推薦

        專題
        Top
        主站蜘蛛池模板: 色www永久免费网站| 337P日本欧洲亚洲大胆艺术图 | 亚洲AV永久无码精品一百度影院 | 亚洲免费在线观看| 九九免费久久这里有精品23| 免费在线观看的黄色网址| 美女被免费视频网站| 亚洲无码精品浪潮| 免费精品国产自产拍在| 亚洲Av无码乱码在线播放| 国产精品亚洲专区在线播放| 免费在线黄色网址| 久久久免费观成人影院| 国产av无码专区亚洲av桃花庵| 亚洲AV永久无码精品一福利| 日本无吗免费一二区| 成人午夜免费视频| 亚洲色无码专区在线观看| 99久久免费中文字幕精品| 亚洲国产系列一区二区三区| 国产中文字幕免费| a级毛片无码免费真人久久| 99ri精品国产亚洲| 日韩精品免费一区二区三区| 美女被吸屁股免费网站| 婷婷亚洲久悠悠色悠在线播放| 亚洲一级免费毛片| 亚洲国产综合专区电影在线 | 男人的天堂亚洲一区二区三区 | 亚洲欧美日韩综合久久久| 国产极品粉嫩泬免费观看| 成在人线av无码免费高潮水| 亚洲综合久久成人69| 国产无遮挡裸体免费视频 | 岛国岛国免费V片在线观看| 亚洲高清无在码在线电影不卡| 国产精品青草视频免费播放| 久久精品九九亚洲精品| 在线观看免费亚洲| 久久精品无码专区免费东京热| 亚洲AV成人片无码网站|