Centos7 rpm方式安装Percona Mysql 8

1. 下载安装包

Percona Mysql安装包下载地址:https://www.percona.com/downloads/Percona-Server-LATEST

下载以下四个安装包:

percona-server-client-8.0.17-8.1.el7.x86_64.rpm

percona-server-server-8.0.17-8.1.el7.x86_64.rpm

percona-server-shared-8.0.17-8.1.el7.x86_64.rpm

percona-server-shared-compat-8.0.17-8.1.el7.x86_64.rpm


2.  安装


安装时报错:

rpm -ivh percona-server-shared-compat-8.0.17-8.1.el7.x86_64.rpm

warning: percona-server-shared-compat-8.0.17-8.1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 8507efa5: NOKEY

error: Failed dependencies:

mariadb-libs is obsoleted by percona-server-shared-compat-8.0.17-8.1.el7.x86_64

因为安装了mariadb-libs,需要先删除:

yum remove mariadb*


rpm -ivh percona-server-shared-8.0.17-8.1.el7.x86_64.rpm

rpm -ivh percona-server-client-8.0.17-8.1.el7.x86_64.rpm


rpm -ivh percona-server-server-8.0.17-8.1.el7.x86_64.rpm

需要先安装依赖包:yum install numactl,如果不安装报错如下:

rpm -ivh percona-server-server-8.0.17-8.1.el7.x86_64.rpm 

warning: percona-server-server-8.0.17-8.1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 8507efa5: NOKEY

error: Failed dependencies:

libnuma.so.1()(64bit) is needed by percona-server-server-8.0.17-8.1.el7.x86_64

libnuma.so.1(libnuma_1.1)(64bit) is needed by percona-server-server-8.0.17-8.1.el7.x86_64

libnuma.so.1(libnuma_1.2)(64bit) is needed by percona-server-server-8.0.17-8.1.el7.x86_64



3. 启动mysql

service mysql start

ps -ef |grep mysql

service mysql status


4. 登录mysql

Percona Mysql 默认密码:

cat /var/log/mysqld.log |grep "temporary password"

[Note] [MY-010454] [Server] A temporary password is generated for root@localhost:


登录时需对密码特殊字符转义:

mysql -uroot -p\


登录后需重置密码:

ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

alter user user()  identified by 'password';

密码需符合密码规则,否则重置密码失败:

ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

你可能感兴趣的:(Centos7 rpm方式安装Percona Mysql 8)