一、安装步骤
#切换到安装目录 cd /data/mysql/setup #解压MySQL安装文件包 tar vxf mysql-8.0.17-1.el7.x86_64.rpm-bundle.tar #删除mariadb相关安装包 yum remove -y mariadb* MariaDB* #安装mysql与xtrabackup yum localinstall -y mysql-community-common-8.0.17-1.el7.x86_64.rpm mysql-community-libs-8.0.17-1.el7.x86_64.rpm mysql-community-server-8.0.17-1.el7.x86_64.rpm mysql-community-client-8.0.17-1.el7.x86_64.rpm mysql-community-libs-compat-8.0.17-1.el7.x86_64.rpm percona-xtrabackup-80-8.0.7-1.el7.x86_64.rpm #创建MySQL相关目录 mkdir -p /data/mysql/data /data/mysql/log /data/mysql/bin-log chown -R mysql.mysql /data/mysql/data /data/mysql/log /data/mysql/bin-log #复制并覆盖my.cnf cp -rf my.cnf /etc/my.cnf
二、可能会遇到的问题
在yumlocalinstall过程中,因为percona-xtrabackup需要依赖其他rpm包,所以此过程中需要手动下载并安装rpm包,下面为本人在centos7.5中安装时候需要的rpm包,进行了总结,安装如下顺序执行安装即可,其相应的安装包可前往https://pkgs.org/下载,或者前往我的下载主页资源中下载,已经将全部包打包。
rpm -ivh perl-Net-Daemon-0.48-5.el7.noarch.rpm
rpm -ivh perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64.rpm
rpm -ivh perl-Compress-Raw-Zlib-2.061-4.el7.x86_64.rpm
rpm -ivh perl-IO-Compress-2.061-2.el7.noarch.rpm
rpm -ivh perl-PlRPC-0.2020-14.el7.noarch.rpm
rpm -ivh perl-Digest-1.17-245.el7.noarch.rpm
rpm -ivh perl-Digest-MD5-2.52-3.el7.x86_64.rpm
rpm -ivh libev-4.15-7.el7.x86_64.rpm
rpm -ivh perl-DBI-1.627-4.el7.x86_64.rpm
rpm -ivh mariadb-libs-5.5.65-1.el7.x86_64.rpm
rpm -ivh perl-DBD-MySQL-4.033-1.of.el7.x86_64.rpm