OS: CentOS7 (x86_64)
MySQL: MySQL Percona 5.7.31-34
0 前置条件
已配置完成YUM源
已卸载先前可能安装的MySQL
rpm -qa | grep -i mariadb
rpm -qa | grep -i mysql
rpm -qa | grep -i percona
rpm -e --nodeps xxxx.rpm
1 获得安装源
[方式1.1] 下载/上传/解压安装包
Percona-Server-shared-57-5.7.31-34.1.el6.x86_64.rpm
Percona-Server-server-57-5.7.31-34.1.el6.x86_64.rpm
Percona-Server-client-57-5.7.31-34.1.el6.x86_64.rpm
...
(建议下载全包(bundle.tar),否则 容易出现各类依赖问题,较为费时费力)
假定:上传上述安装包(...-bundle.tar)至服务器 /opt/software/MySQL-Percona-57-Official-All/
[root@centos7-202010061038 ~]# cd /opt/software/MySQL-Percona-57-Official-All
[root@centos7-202010061038 ]# tar -xvf /opt/software/MySQL-Percona-57-Official-All/Percona-Server-5.7.31-34-r2e68637-el6-x86_64-bundle.tar
Percona-Server-57-debuginfo-5.7.31-34.1.el6.x86_64.rpm
Percona-Server-client-57-5.7.31-34.1.el6.x86_64.rpm
Percona-Server-devel-57-5.7.31-34.1.el6.x86_64.rpm
Percona-Server-rocksdb-57-5.7.31-34.1.el6.x86_64.rpm
Percona-Server-server-57-5.7.31-34.1.el6.x86_64.rpm
Percona-Server-shared-57-5.7.31-34.1.el6.x86_64.rpm
Percona-Server-test-57-5.7.31-34.1.el6.x86_64.rpm
Percona-Server-tokudb-57-5.7.31-34.1.el6.x86_64.rpm
[方式1.2] 配置 MySQL Percona的YUM源
rpm -Uvh https://www.percona.com/redir/downloads/percona-release/redhat/0.1-6/percona-release-0.1-6.noarch.rpm
更新过yum源后,会在 /etc/yum.repos.d/ 下生成 percona-release.repo,如下图:
此时:
先查看有哪些可用MySQL Percona的安装包
yum list | grep percona
yum list | grep Percona-Server-server