>

MySQL下高可用故障转移方案MHA的超级部署教程

- 编辑:大富豪棋牌游戏下载 -

MySQL下高可用故障转移方案MHA的超级部署教程

目录

MySQL下高可用故障转移方案MHA的最好安插教程,

MHA介绍 MHA是一人东瀛MySQL大咖用Perl写的后生可畏套MySQL故障切换方案,来作保数据库系统的高可用.在宕机的年华内(平日10—30秒内卡塔 尔(阿拉伯语:قطر‎,完毕故障切换,布署MHA,可防止主从后生可畏致性问题,节约购置新服务器的开支,不影响服务器质量,易安装,不变现存安顿。
 
   还扶持在线切换,从一时运维master切换成一个新的master下面,只要求非常短的大运(0.5-2秒内卡塔 尔(英语:State of Qatar),这个时候只是堵塞写操作,并不影响读操作,便于主机硬件保障。
 
在有高可用,数据风度翩翩致性必要的系统上,MHA 提供了平价的效果,大约无间断的满意维护须要。
 
优点:
 
1.master自动监控和故障转移
 
  在脚下已存在的主从复制境况中,MHA能够监察和控制master主机故障,并且故障自动调换。
 
就算有局地slave未有收受新的relay log events,MHA也会从最新的slave自动识别差距的relay log events,并apply差别的event到其它slaves。因而具备的slave都以同风姿洒脱的。MHA秒等第故障转移(9-12秒监测到主机故障,任选7分钟关闭电源主机幸免脑裂,接下去apply差别relay logs,注册到新的master,平时需求时刻10-30秒即total downtime卡塔尔。其余,在配置文件里能够配备八个slave优先成为master。因为MHA修复了slave之间的生龙活虎致性,dba就不用去管理风姿洒脱致性难题。
 
     当迁移新的master之后,并行苏醒其余slave。尽管有众多的slave,也不会潜移暗化恢复生机master时间,slave也急忙到位。
 
      DeNA公司在150 主从情状中用MHA。当此中三个master崩溃,MH凯越秒完成故障转移,那是主动/被动集群建设方案不能到位的。
 
2.人机联作(手动)master故障转移  
 MHA能够用来只做故障转移,而不监测master,MHA只看做故障转移的相互。
 
3.非人机联作式故障转移  
 非人机联作式的故障转移也提供(不监察和控制master,自动故障转移卡塔 尔(英语:State of Qatar)。那些特点很有用,极其是您早已设置了别的软件监察和控制master。比方,用Pacemaker(Heartbeat)监测master故障和vip接管,用MHA故障转移和slave升高。
 
4.在线切换master到区别主机  
 在不计其数场所下,有要求将master转移到别的主机上(如替换raid调控器,提高master机器硬件等等卡塔尔。那实际不是master崩溃,不过计划维护必需去做。安插维护引致downtime,必须尽量快的复苏。快速的master切换和雅淡的窒碍写操作是少不了的,MHA提供了这种方法。文雅的master切换, 0.5-2秒内拥塞写操作。在众多情景下0.5-2秒的downtime是能够担任的,而且固然不在安顿维护窗口。这意味着当必要改换更加快机器,进级高版本时,dba能够比较轻易选用动作。
 
5.master crash不会促成基本数据不豆蔻梢头致性  
    当master crash后,MHA自动识别slave间relay logevents的不如,然后利用与不相同的slave,最后具有slave都三头。结合通过半同步一齐接受,大概从不别的数据遗失。
 
任何高可用方案
 
6.MHA安排不影响当下条件设置
 
MHA最要害的三个两全意见正是尽或许采用简便。使用与5.0 以上主从意况,别的HA方案要求改造mysql安排设置,MHA不会让dba做那一个布署计划,同步和半协助举行情状都能够用。运营/停止/进级/降级/安装/卸载 MHA都不要改动mysql主从(如运营/结束卡塔 尔(阿拉伯语:قطر‎。
 
当你须求升高MHA到新本猴时,不需求甘休mysql,仅仅更新HMA版本,然后再一次开动MHAmanger就能够。
 
   MHA 帮忙包蕴5.0/5/1/5.5(应该也支撑5.6,翻译文书档案时MHA开采者没更新对于5.6版本)。有个别HA方案要求一定的mysql版本(如mysqlcluster,mysql with global transaction id 等卡塔尔,何况你或者不想单独为了MasterHA而搬迁应用。超级多动静下,公司已经布置了比相当多金钱观的mysql应用,开荒或dba不想花太多时光迁移到不一样的储存引擎或新的特征(newer bleeding edge distributions 不驾驭那个是否该这么翻译卡塔 尔(英语:State of Qatar)。
 
7.不扩充服务器开销  
MHA 包括MHA Manager和MHA node。MHA node运维在每台mysql服务器上,Manager能够独自安插少年老成台机器,监察和控制100 以上master,总服务器数量不会有太大增添。供给留意的是Manager也能够运维在slaves中的风度翩翩台机械上。
 
8.品质无影响
 
当监察和控制master,MHA只是几分钟(默许3秒卡塔尔发送ping包,不发送大的询问。主从复制品质不受影响
 
9.适用其余存储引擎   Mysql不仅适用于业务安全的innodb引擎,在主从当中适用的引擎,MHA都足以适用。即选择遗留情况的mysiam引擎,不实行搬迁,也得以用MHA。

设置配置形式
1、示例蒙受介绍

  •          centos 6.4 x64
  •          mysql-5.6.16-linux-glibc2.5-x86_64.tar.gz
  •          mha4mysql-manager-0.54.tar.gz
  •          mha4mysql-node-0.54.tar.gz

2、服务器表明

  •          masnager                  192.168.216.50
  •          master              192.168.216.51
  •          slave                  192.168.216.52

         三台服务器都设置mysql,将manager作为管理节点

3、配置等价性

         manager:

          ssh-keyger -t rsa

          ssh-coyp-id -i /root/.ssh/id_rsa.pub [email protected]

          ssh-coyp-id -i /root/.ssh/id_rsa.pub [email protected]

          ssh-coyp-id -i /root/.ssh/id_rsa.pub [email protected]

          ssh 192.168.216.50 date

          ssh 192.168.216.51 date

          ssh 192.168.216.52 date

         master:

          ssh-keyger -t rsa

          ssh-coyp-id -i /root/.ssh/id_rsa.pub [email protected]

          ssh-coyp-id -i /root/.ssh/id_rsa.pub [email protected]

          ssh-coyp-id -i /root/.ssh/id_rsa.pub [email protected]

          ssh 192.168.216.50 date

          ssh 192.168.216.51 date

          ssh 192.168.216.52 date

         slave:

          ssh-keyger -t rsa

          ssh-coyp-id -i /root/.ssh/id_rsa.pub [email protected]

          ssh-coyp-id -i /root/.ssh/id_rsa.pub [email protected]

          ssh-coyp-id -i /root/.ssh/id_rsa.pub [email protected]

          ssh 192.168.216.50 date

          ssh 192.168.216.51 date

          ssh 192.168.216.52 date

4、安装mysql

    groupadd mysql

     useradd -g mysql -s /bin/nologin -M mysql

     mkdir -pv /data/mysql

     tar -zxvf mysql-5.6.16-linux-glibc2.5-x86_64.tar.gz
     mv mysql-5.6.16-linux-glibc2.5-x86_64 /usr/local/mysql

     cd /usr/local/mysql/script

     ./ mysql_install_db –user=mysql –basedir=/usr/local/mysql –datadair=/data/mysql

         创制mysql配置文件

     vim /usr/local/mysql/my.cnf

 

    [mysql]

     # CLIENT #

     port              = 3306

     socket             = /tmp/mysql.sock



     [mysqld]

     # GENERAL #

     user              = mysql

     default-storage-engine     = InnoDB

     socket             = /tmp/mysql.sock

     pid-file            = /data/mysql/mysql.pid



     # MyISAM #

     key-buffer-size        = 32M

     myisam-recover         = FORCE,BACKUP



     # SAFETY #

     max-allowed-packet       = 16M

     max-connect-errors       = 1000000



     # DATA STORAGE #

     datadir            = /data/mysql/



     # BINARY LOGGING #

     server_id                        = 1      #不同服务器不一样

     log-bin            = /data/mysql/mysql-bin

     expire-logs-days        = 14

     sync-binlog          = 1



     # CACHES AND LIMITS #

     tmp-table-size         = 32M

     max-heap-table-size      = 32M

     query-cache-type        = 0

     query-cache-size        = 0

     max-connections        = 500

     thread-cache-size       = 50

     open-files-limit        = 65535

     table-definition-cache     = 1024

     table-open-cache        = 2048



     # INNODB #

     innodb-flush-method      = O_DIRECT

     innodb-log-files-in-group   = 2

     innodb-log-file-size      = 64M

     innodb-flush-log-at-trx-commit = 1

     innodb-file-per-table     = 1

     innodb-buffer-pool-size    = 592M



     # LOGGING #

     log-error           = /data/mysql/mysql-error.log

     log-queries-not-using-indexes = 1

     slow-query-log         = 1

     slow-query-log-file      = /data/mysql/mysql-slow.log

5、配置权力

         manager:

          grant all privileges on *.* to [email protected]'127.0.0.1' identified by 'root';

          grant all privileges on *.* to [email protected]'localhost' identified by 'root';

          grant all privileges on *.* to [email protected]'192.168.216.50' identified by 'root';

          grant replication slave on *.* to [email protected]'192.168.216.50' identified by 'slave';

          grant replication slave on *.* to [email protected]'192.168.216.51' identified by 'slave';

          grant replication slave on *.* to [email protected]'192.168.216.52' identified by 'slave';

         master:

          grant all privileges on *.* to [email protected]'127.0.0.1' identified by 'root';

          grant all privileges on *.* to [email protected]'localhost' identified by 'root';

          grant all privileges on *.* to [email protected]'192.168.216.50' identified by 'root';

          grant replication slave on *.* to [email protected]'192.168.216.50' identified by 'slave';

          grant replication slave on *.* to [email protected]'192.168.216.51' identified by 'slave';

          grant replication slave on *.* to [email protected]'192.168.216.52' identified by 'slave';

         slave:

          grant all privileges on *.* to [email protected]'127.0.0.1' identified by 'root';

          grant all privileges on *.* to [email protected]'localhost' identified by 'root';

          grant all privileges on *.* to [email protected]'192.168.216.50' identified by 'root';

          grant all privileges on *.* to [email protected]'192.168.216.51' identified by 'root';

          grant replication slave on *.* to [email protected]'192.168.216.50' identified by 'slave';

          grant replication slave on *.* to [email protected]'192.168.216.51' identified by 'slave';

          grant replication slave on *.* to [email protected]'192.168.216.52' identified by 'slave';

6、安装注重包

         管理服务器manager供给设置以下全体

perl-Config-Tiny

perl-Params-Validate

perl-Parallel-ForkManager

perl-Log-Dispatch

|- perl-MIME-Lite-3.027-2.el6.noarch.rpm

     |- perl-MIME-Types-1.28-2.el6.noarch.rpm

     |- perl-Email-Date-Format-1.002-5.el6.noarch.rpm

     |- perl-MailTools-2.04-4.el6.noarch.rpm

          |- perl-TimeDate-1.16-11.1.el6.noarch.rpm

          |- perl-Data-ShowTable-3.3-3.4.noarch.rpm

|- perl-Mail-Sender-0.8.22-21.1.noarch.rpm

     |- perl-IO-Socket-SSL-1.31-2.el6.noarch.rpm

          |- perl-Net-LibIDN-0.12-3.el6.x86_64.rpm

          |- perl-Net-SSLeay-1.35-9.el6.x86_64.rpm

     |-perl-Win32API-Registry

|- perl-Mail-Sendmail-0.79_16-4.2.noarch.rpm

 

     rpm -ivh ncftp-debuginfo-3.2.3-1.3.x86_64.rpm

     rpm -ivh perl-Parallel-ForkManager-0.7.5-2.2.el6.rf.noarch.rpm

     rpm -ivh perl-Params-Validate-0.91-2.4.x86_64.rpm

     rpm -ivh perl-Config-Tiny-2.12-7.1.el6.noarch.rpm

     rpm -ivh perl-MIME-Types-1.28-2.el6.noarch.rpm

     rpm -ivh perl-Email-Date-Format-1.002-5.el6.noarch.rpm

     rpm -ivh perl-TimeDate-1.16-11.1.el6.noarch.rpm

     rpm -ivh perl-Data-ShowTable-3.3-3.4.noarch.rpm

     rpm -ivh perl-MailTools-2.04-4.el6.noarch.rpm

     rpm -ivh perl-MIME-Lite-3.027-2.el6.noarch.rpm

     rpm -ivh perl-Net-LibIDN-0.12-3.el6.x86_64.rpm

     rpm -ivh perl-Net-SSLeay-1.35-9.el6.x86_64.rpm

     rpm -ivh perl-IO-Socket-SSL-1.31-2.el6.noarch.rpm

     rpm -ivh perl-Mail-Sendmail-0.79_16-4.2.noarch.rpm

     rpm -ivh perl-Mail-Sender-0.8.22-21.1.noarch.rpm

     rpm -ivh perl-Log-Dispatch-2.22-7.3.noarch.rpm

 

         如果安perl-DBD-MySQL-4.013-3.el6.x86_64.rpm在自己商酌rep是报错则须求手动编写翻译安装

     tar -zxvf DBD-mysql-4.027.tar.gz

     cd DBD-mysql-4.0.27

     perl Makefile.PL

     make && make install

         节点服务器安装

     rpm -ivh ncftp-debuginfo-3.2.3-1.3.x86_64.rpm

     rpm -ivh perl-DBD-MySQL-4.013-3.el6.x86_64.rpm

7、创造软连接

     ln -s /usr/local/mysql/bin/mysqlbinlog /usr/bin/mysqlbinlog

     ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql

         导出mysql库寻觅路线

     vim /etc/ld.so.conf.d/mysql-x86_64.conf

       /usr/local/mysql/lib

     ldconfig

8、在具有服务器上安装mha4mysql-node-0.54.tar.gz

     tar -zxvf mha4mysql-node-0.54.tar.gz

     cd mha4mysql-node-0.54

     perl Makefile.PL

     make && make install

9、在关押服务上安装 mha4mysql-manager-0.54.tar.gz

     tar -zxvf mha4mysql-manager-0.54.tar.gz

     cd mha4mysql-manager-0.54

     perl Makefile.PL

     make && make install

     mkdir -pv /etc/masterha

     mkdir -pv /masterha/app1

     cp samples/conf/* /etc/masterha

     cp samples/scripts/* /usr/local/bin

 

     vim /etc/masterha/app1.cnf

     [server default]

     manager_workdir=/masterha/app1

     manager_log=/masterha/app1/manager.log



     user=root

     password=root



     ssh_user=root

     repl_user=slave

     repl_password=slave

     shutdown_script=""

     #master_ip_failover_script="/usr/local/bin/masterha_ip_failover"

     master_ip_online_change_script="/usr/local/bin/masterha_ip_failover "

     report_script=""



     [server1]

     hostname=192.168.216.50

     master_binlog_dir="/data/mysql/"

     candidate_master=1



     [server2]

     hostname=192.168.216.51

     master_binlog_dir="/data/mysql/"

     candidate_master=1



     [server3]

     hostname=192.168.216.52

     master_binlog_dir="/data/mysql/"

     candidate_master=1

10、测试ssh连接

     masterha_check_ssh –conf=/etc/masterha/app1.cnf

11、测试replication

    masterha_check_repl –conf=/etc/masterha/app1.cnf

12、开启管理节点进度

 

   masterha_manager –conf=/etc/masterha/app1.cnf

13、测验故障转移

       关闭主库mysql,查看从库的的情况是否将同台ip切换来新的主库

14、设置故障转移的ip

     vim /etc/masterha/app1.cnf

          master_ip_failover_script="/usr/local/bin/masterha_ip_failover "

          master_ip_online_change_script="/usr/local/bin/masterha_ip_failover "

         编辑故障转移脚本,将vip设置成192.168.216.100

     vim /usr/local/bin/masterha_ip_failover

#!/usr/bin/env perl

use strict;

use warnings FATAL => 'all';



use Getopt::Long;



my (

  $command,     $ssh_user,    $orig_master_host, $orig_master_ip,

  $orig_master_port, $new_master_host, $new_master_ip,  $new_master_port

);



# my $vip = '172.16.21.119/24'; # Virtual IP

my $vip = '192.168.216.100/24'; # Virtual IP

my $key = "1";

my $ssh_start_vip = "/sbin/ifconfig eth0:$key $vip";

my $ssh_stop_vip = "/sbin/ifconfig eth0:$key down";



GetOptions(

  'command=s'     => $command,

  'ssh_user=s'     => $ssh_user,

  'orig_master_host=s' => $orig_master_host,

  'orig_master_ip=s'  => $orig_master_ip,

  'orig_master_port=i' => $orig_master_port,

  'new_master_host=s' => $new_master_host,

  'new_master_ip=s'  => $new_master_ip,

  'new_master_port=i' => $new_master_port,

);



exit &main();



sub main {



  print "nnIN SCRIPT TEST====$ssh_stop_vip==$ssh_start_vip===nn";



  if ( $command eq "stop" || $command eq "stopssh" ) {



    # $orig_master_host, $orig_master_ip, $orig_master_port are passed.

    # If you manage master ip address at global catalog database,

    # invalidate orig_master_ip here.

    my $exit_code = 1;

    eval {

      print "Disabling the VIP on old master: $orig_master_host n";

      &stop_vip();

      $exit_code = 0;

    };

    if ([email protected]) {

      warn "Got Error: [email protected]n";

      exit $exit_code;

    }

    exit $exit_code;

  }

  elsif ( $command eq "start" ) {



    # all arguments are passed.

    # If you manage master ip address at global catalog database,

    # activate new_master_ip here.

    # You can also grant write access (create user, set read_only=0, etc) here.

    my $exit_code = 10;

    eval {

      print "Enabling the VIP – $vip on the new master – $new_master_host n";

      &start_vip();

      $exit_code = 0;

    };

    if ([email protected]) {

      warn [email protected];

      exit $exit_code;

    }

    exit $exit_code;

  }

  elsif ( $command eq "status" ) {

    print "Checking the Status of the script.. OK n";

    `ssh $ssh_user@cluster1 " $ssh_start_vip "`;

    exit 0;

  }

  else {

    &usage();

    exit 1;

  }

}



# A simple system call that enable the VIP on the new master

sub start_vip() {

  `ssh $ssh_user@$new_master_host " $ssh_start_vip "`;

}

# A simple system call that disable the VIP on the old_master

sub stop_vip() {

  `ssh $ssh_user@$orig_master_host " $ssh_stop_vip "`;

}



sub usage {

  print

  "Usage: master_ip_failover –command=start|stop|stopssh|status –orig_master_host=host –orig_master_ip=ip –orig_master_port=port –new_master_host=host –new_master_ip=ip –new_master_port=portn";

}

 

测量试验脚本

/usr/local/bin/masterha_ip_failover –command=status –ssh_user=root –orig_master_host=192.168.216.51 –orig_master_ip=192.168.216.51 –orig_master_port=3306

虚构ip要手动运转,在主库故障后会自动转变。

/usr/local/bin/masterha_ip_failover –command=start –ssh_user=root –orig_master_host=192.168.216.51 –orig_master_ip=192.168.216.51 –orig_master_port=3306 –new_master_host=192.168.216.51

测量试验ip故障转移:

闭馆主库mysql,查看vip是或不是转移的新的主库上。

  • 安装
  • mysqlreplicate
  • mysqlrplcheck
  • mysqlrplshow
  • mysqlrpladmin
  • mysqlfailover
  • mysqldbcompare
  • 详见介绍

你也许感兴趣的篇章:

  • MHA达成mysql主从数据库手动切换的方法

MHA介绍 MHA是一个人日本MySQL大拿用Perl写的生龙活虎套MySQL故障切换方案,来承保数据库系统的高可用...



mysql-utilities 是python编写 MySQL官方版的下令行工具集,包括主从校验,主从建设构造,主从切换等等

安装

rpm安装
小心 尽量不要通过yum来设置mysql-utilities,mysql-utilities 1.6.5和mysql-connector-python 8.0.12在一块不平日!

mysql5.6
rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm

卸载
yum -y remove mysql-community-release

mysql5.7
rpm -Uvh http://repo.mysql.com//mysql57-community-release-el7-8.noarch.rpm
yum install  mysql-utilities.noarch

mysql5.7 yum源 还或许会设置信任mysql-connector-python 8.0.12-1.el7
图片 1

二进制安装

yum install mysql-connector-python
wget https://cdn.mysql.com/archives/mysql-utilities/mysql-utilities-1.6.5.tar.gz
tar -zxf mysql-utilities-1.6.5.tar.gz
cd mysql-utilities-1.6.5

python ./setup.py build
python ./setup.py install

通过tar.gz安装和yum安装mysql-utilities现身错误
图片 2
图片 3

莫不模块未有在检索路线中
图片 4

export PYTHONPATH=$PYTHONPATH:/root/mysql-utilities-1.6.5/mysql/utilities/common/tools
试了也非常

设置mysql5.6 yum源以rpm方式设置的mysql-utilities不会报module找不到

解决

卸载原mysql-connector-python8.0版本 
yum  -y remove  mysql-connector-python
并下载安装mysql-connector-python-2.1.7
rpm -Uvh https://cdn.mysql.com//Downloads/Connector-Python/mysql-connector-python-2.1.7-1.el7.x86_64.rpm

mysqldbcompare --version
MySQL Utilities mysqldbcompare version 1.6.5 
License type: GPLv2

立即还在纠缠为何安装mysql5.7 yum源在以yum安装mysql-utilities和以tar.gz方式来设置mysql-utilites
二种方法该部分/mysql/utilities/common和tools.py 下的check_python_version都有了,而安装mysql5.6
yum源不报错,查看 mysql-connector-python版本时才察觉双方的版本不相仿,在MySQL中 mysql-co
nnector-python 8.0.12-1.el7 高版本的不相配低版本的,这是个坑-__-

mysqlreplicate

主从复制工具

mysqlreplicate --master=admin:admin@10.186.30.73:3307 
          --slave=admin:admin@10.186.30.58:3307 --rpl-user=rpl:rpl

--pedantic选项来确定保障主和从复制作而成功,当且仅当多个服务器材备相近的储存引擎,相仿的私下认可存款和储蓄引擎和同等的InnoDB存款和储蓄引擎

mysqlrplcheck

主从复制检查评定工具

mysqlrplcheck --master=admin:admin@10.186.30.73:3307 
          --slave=admin:admin@10.186.30.58:3307 
           --show-slave-status -vv

mysqlrplshow

主从复制拓扑图工具

mysqlrplshow --master=admin:admin@10.186.30.73:3307    
        --discover-slaves-login=admin:admin --verbose --recurse

mysqlrpladmin

主从复制管理工科具

mysqlrpladmin --master=admin:admin@10.186.30.73:3307 
          --slave=admin:admin@10.186.30.58:3307 Health

mysqlrpladmin --master=admin:admin@10.186.30.73:3307 
          --slave=admin:admin@10.186.30.58:3307 gtid

mysqlrpladmin --master=admin:admin@10.186.30.73:3307 
         --slave=admin:admin@10.186.30.58:3307 reset

mysqlrpladmin -vv --master=admin:admin@10.186.30.73:3307 
         --slave=admin:admin@10.186.30.58:3307  
         --new-master=admin:admin@10.186.30.58:3307 --demote-master switchover

mysqlrpladmin -vv --slave=admin:admin@10.186.30.58:3307 failover

mysqlrpladmin 1.3.6对mysql5.7 会出现错误
# Checking privileges.
ERROR: Query failed. 1054 (42S22): Unknown column 'password' in 'field list'

mysqlfailover

骨干切换工具

mysqlfailover --master=admin:admin@10.186.30.73:3307 --discover-slaves-login=admin --candidates=admin:admin@10.186.30.58:3307

mysqldbcompare

多少库库等第相比较工具

mysqldbcompare --server1=admin:admin@10.186.30.73:3307 --server2=admin:admin@10.186.30.58:3307 --changes-for=server2 --difftype=sql --run-all-tests test

详尽介绍

Binary Log Operations(二进制日志操作) 
        mysqlbinlogmove   二进制日志移动
        mysqlbinlogpurge  二进制日志清理
        mysqlbinlogrotate 二进制日志老化工具    

Database Operations(数据库操作)
        mysqldbexport     数据导出
        mysqldbimport     数据导入
        mysqldbcopy       库级别数据库复制
        mysqldiff         数据库对象级别比较工具
        mysqldbcompare    数据库库级别比较工具

General Operations(通用用的操作)     
        mysqldiskusage    磁盘空间查看
        mysqlfrm          恢复故障表.frm文件
        mysqluserclone    用户克隆工具
        mysqluc           Utilities帮助工具 
        mysqlindexcheck   索引检测工具
        mysqlmetagrep     元数据过滤器
        mysqlprocgrep     进程搜索及清理工具

High Availability Operations(高可用)
        mysqlreplicate   主从复制工具
        mysqlrpladmin    主从复制管理工具
        mysqlrplcheck    主从复制检测工具
        mysqlrplms       主从多元复制工具
        mysqlrplshow     主从复制拓扑图工具
        mysqlrplsync     主从复制同步工具
        mysqlfailover    主从failover工具
        mysqlslavetrx    从库事务跳过工具 

Server Operations(服务器操作)
        mysqlserverinfo    服务器信息查看工具
        mysqlserverclone   服务器克隆工具    

Specialized Operations(特殊操作)
        mysqlauditadmin    审计管理工具 
        mysqlauditgrep     审计日志过滤工具

参考:

MySQL Utilities工具包概述及安装

Mysql Utilities

本文由关于我们发布,转载请注明来源:MySQL下高可用故障转移方案MHA的超级部署教程