linux上安装的xtrabackup版本为8.0版本,与当前库的版本不一致,如何更换xtrabackup的版本
xtrabackup --version
xtrabackup version 8.0.35-30 based on MySQL server 8.0.35 Linux (x86_64) (revision id: 6beb4b49)
如何下载
首先到percona的官网去下载对应的版本https://www.percona.com/downloads
mysql5.7对应的版本是percona xtrabackup 2.4 下载和系统对应的版本
查看软链接
ls -lhrt /usr/bin/xtrabackup
/usr/bin/xtrabackup -> /usr/local/percona-xtrabackup-8.0.35-30-Linux-x86_64.glibc2.17/bin/xtrabackup
删除软链接
unlink /usr/bin/xtrabackup 或者 rm -rf /usr/bin/xtrabackup
上传下载的2.4版本
解压
tar xvf percona-xtrabackup-2.4.29-Linux-x86_64.glibc2.17.tar.gz -C /usr/local
安装依赖包
yum install perl-Digest-MD5 perl-DBD-MySQL libev -y
设置软链接
cd /usr/local/percona-xtrabackup-2.4.29-Linux-x86_64.glibc2.17/bin
ln -s /usr/local/percona-xtrabackup-2.4.29-Linux-x86_64.glibc2.17/bin/xtrabackup /usr/bin/xtrabackup
查看版本号
xtrabackup --version
xtrabackup: recognized server arguments:
xtrabackup version 2.4.29 based on MySQL server 5.7.44 Linux (x86_64) (revision id: 2e6c0951)