系统环境
[root@master ~]# cat /etc/redhat-release;uname -r;uname -m; CentOS Linux release 7.5.1804 (Core) 3.10.0-862.el7.x86_64 x86_64
安装步骤
# 进入到/root/tools目录下,对软件包进行解压 [root@Master ~]# cd tools/ [root@Master tools]# tar xf mysql-utilities-1.6.5.tar.gz [root@Master tools]# ll * drwxr-xr-x 6 7161 31415 4096 Jan 18 2017 mysql-utilities-1.6.5 -rw-r--r-- 1 root root 668241 Jul 26 11:21 mysql-utilities-1.6.5.tar.gz # 进入解压后的目录,进行安装 [root@Master tools]# cd mysql-utilities-1.6.5 [root@Master mysql-utilities-1.6.5]# python setup.py build [root@Master mysql-utilities-1.6.5]# python setup.py install # 检查是否安装成功 [root@Master ~]# mysqlreplicate --version #mysqlreplicate只是其中一个工具哈 MySQL Utilities mysqlreplicate version 1.6.5 License type: GPLv2 # 我们看一看这个工具包中有哪些工具哈 [root@master ~]# ll /usr/bin/mysql* -rwxr-xr-x 1 root root 11966 Sep 15 03:22 /usr/bin/mysqlauditadmin -rwxr-xr-x 1 root root 12207 Sep 15 03:22 /usr/bin/mysqlauditgrep -rwxr-xr-x 1 root root 15938 Sep 15 03:22 /usr/bin/mysqlbinlogmove -rwxr-xr-x 1 root root 7993 Sep 15 03:22 /usr/bin/mysqlbinlogpurge -rwxr-xr-x 1 root root 3761 Sep 15 03:22 /usr/bin/mysqlbinlogrotate -rwxr-xr-x 1 root root 17957 Sep 15 03:22 /usr/bin/mysqldbcompare -rwxr-xr-x 1 root root 16193 Sep 15 03:22 /usr/bin/mysqldbcopy -rwxr-xr-x 1 root root 14790 Sep 15 03:22 /usr/bin/mysqldbexport -rwxr-xr-x 1 root root 14160 Sep 15 03:22 /usr/bin/mysqldbimport -rwxr-xr-x 1 root root 12368 Sep 15 03:22 /usr/bin/mysqldiff -rwxr-xr-x 1 root root 7383 Sep 15 03:22 /usr/bin/mysqldiskusage -rwxr-xr-x 1 root root 17246 Sep 15 03:22 /usr/bin/mysqlfailover -rwxr-xr-x 1 root root 18219 Sep 15 03:22 /usr/bin/mysqlfrm -rwxr-xr-x 1 root root 10954 Sep 15 03:22 /usr/bin/mysqlgrants -rwxr-xr-x 1 root root 6459 Sep 15 03:22 /usr/bin/mysqlindexcheck -rwxr-xr-x 1 root root 5355 Sep 15 03:22 /usr/bin/mysqlmetagrep -rwxr-xr-x 1 root root 5972 Sep 15 03:22 /usr/bin/mysqlprocgrep -rwxr-xr-x 1 root root 7692 Sep 15 03:22 /usr/bin/mysqlreplicate -rwxr-xr-x 1 root root 16910 Sep 15 03:22 /usr/bin/mysqlrpladmin -rwxr-xr-x 1 root root 6405 Sep 15 03:22 /usr/bin/mysqlrplcheck -rwxr-xr-x 1 root root 15545 Sep 15 03:22 /usr/bin/mysqlrplms -rwxr-xr-x 1 root root 6693 Sep 15 03:22 /usr/bin/mysqlrplshow -rwxr-xr-x 1 root root 12063 Sep 15 03:22 /usr/bin/mysqlrplsync -rwxr-xr-x 1 root root 8981 Sep 15 03:22 /usr/bin/mysqlserverclone -rwxr-xr-x 1 root root 5959 Sep 15 03:22 /usr/bin/mysqlserverinfo -rwxr-xr-x 1 root root 6412 Sep 15 03:22 /usr/bin/mysqlslavetrx -rwxr-xr-x 1 root root 6956 Sep 15 03:22 /usr/bin/mysqluc -rwxr-xr-x 1 root root 8046 Sep 15 03:22 /usr/bin/mysqluserclone