1. <ul id="0c1fb"></ul>

      <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
      <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区

      RELATEED CONSULTING
      相關(guān)咨詢
      選擇下列產(chǎn)品馬上在線溝通
      服務(wù)時(shí)間:8:30-17:00
      你可能遇到了下面的問題
      關(guān)閉右側(cè)工具欄

      新聞中心

      這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
      mha在gtid模式下故障的解決方法

      本文在介紹關(guān)于mha在gtid模式下故障解決方法的基礎(chǔ)上,重點(diǎn)探討了其具體步驟,步驟簡單易上手操作,文章內(nèi)容步步緊湊,希望大家根據(jù)這篇文章可以有所收獲。

      我們提供的服務(wù)有:網(wǎng)站設(shè)計(jì)制作、網(wǎng)站建設(shè)、微信公眾號(hào)開發(fā)、網(wǎng)站優(yōu)化、網(wǎng)站認(rèn)證、寧晉ssl等。為1000多家企事業(yè)單位解決了網(wǎng)站和推廣的問題。提供周到的售前咨詢和貼心的售后服務(wù),是有科學(xué)管理、有技術(shù)的寧晉網(wǎng)站制作公司

      問題描述: 

      在gtid模式下  ,mha發(fā)生故障切換 ,如果Linux主機(jī)還存活  ,不會(huì)去比對(duì)master的日志,獲取差異日志 ,有導(dǎo)致數(shù)據(jù)丟失的風(fēng)險(xiǎn) 。

      問題修復(fù):

      找到 MasterFailover.pm 文件   ,將下文! 去掉

          if ( !$_server_manager->is_gtid_auto_pos_enabled() ) {
            $log->info();
            $log->info("* Phase 3.2: Saving Dead Master's Binlog Phase..\n");
            $log->info();
            save_master_binlog($dead_master);
          }

      去掉后的代碼

          if ( $_server_manager->is_gtid_auto_pos_enabled() ) {
            $log->info();
            $log->info("* Phase 3.2: Saving Dead Master's Binlog Phase..\n");
            $log->info();
            save_master_binlog($dead_master);
          }

      找到 apply_binlog_to_master 函數(shù)定義的位置

      sub apply_binlog_to_master($) {
        my $target   = shift;
        my $err_file = "$g_workdir/MySQL_from_binlog.err";
        my $command =
      "cat $_diff_binary_log  | mysql --binary-mode --user=$target->{mysql_escaped_user} --password=$target->{mysql_escaped_password} --host=$target->{ip} --port=$target->{port} -vvv --unbuffered > $err_file 2>&1";
      
        $log->info("Checking if super_read_only is defined and turned on..");
        my ($super_read_only_enabled, $dbh) =
                MHA::SlaveUtil::check_if_super_read_only($target->{hostname}, $target->{ip}, $target->{port}, $target->{user}, $target->{password});
        if ($super_read_only_enabled) {
          MHA::SlaveUtil::disable_super_read_only($dbh);
        } else {
          $log->info(" not present or turned off, ignoring.\n");
        }

      修改后的代碼  cat $_diff_binary_log 

      sub apply_binlog_to_master($) {
        my $target   = shift;
        my $err_file = "$g_workdir/mysql_from_binlog.err";
        my $command =
      "mysqlbinlog $_diff_binary_log --skip-gtids=true | mysql --binary-mode --user=$target->{mysql_escaped_user} --password=$target->{mysql_escaped_password} --host=$target->{ip} --port=$target->{port} -vvv --unbuffered > $err_file 2>&1";
      
        $log->info("Checking if super_read_only is defined and turned on..");
        my ($super_read_only_enabled, $dbh) =
                MHA::SlaveUtil::check_if_super_read_only($target->{hostname}, $target->{ip}, $target->{port}, $target->{user}, $target->{password});
        if ($super_read_only_enabled) {
          MHA::SlaveUtil::disable_super_read_only($dbh);
        } else {
          $log->info(" not present or turned off, ignoring.\n");
        }

      以上就是mha在gtid模式下故障的解決方法,詳細(xì)使用情況還需要大家自己親自動(dòng)手使用過才能領(lǐng)會(huì)。如果想了解更多相關(guān)內(nèi)容,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!


      當(dāng)前標(biāo)題:mha在gtid模式下故障的解決方法
      文章鏈接:http://www.ef60e0e.cn/article/pjoscp.html
      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区
      1. <ul id="0c1fb"></ul>

        <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
        <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

        牟定县| 白河县| 廊坊市| 安丘市| 开化县| 南陵县| 东方市| 田阳县| 汶川县| 依安县| 土默特右旗| 孟村| 阿拉善左旗| 双柏县| 岳阳县| 南岸区| 晋江市| 曲松县| 黄陵县| 瑞丽市| 伊川县| 大丰市| 富蕴县| 广汉市| 丰城市| 武威市| 神农架林区| 三亚市| 肥西县| 沧源| 固原市| 彭州市| 理塘县| 虹口区| 镇安县| 平塘县| 那曲县| 南城县| 商河县| 宿松县| 应用必备|