https://hub.docker.com/r/jonhartley/percona-server

https://www.percona.com/downloads/Percona-Server-5.7/LATEST/


cd   /opt


#通过yum安装

rpm -qa | grep mysql
rpm -qa | grep mariadb
rpm -e mysql
rpm -e --nodeps mysql
yum remove mariadb-libs-5.5.41-2.el7_0.x86_64
## 安装其他依赖包:perl 和libaio
yum -y install perl-Module-Install.noarch
yum -y install libaio libaio-devel
## 配置yum安装源
yum install https://downloads.percona.com/downloads/percona-release/percona-release-1.0-9/redhat/percona-release-1.0-9.noarch.rpm
## 安装percona
yum install Percona-Server-server-57  percona-server-client-57


#通过rpm安装

wget  https://downloads.percona.com/downloads/Percona-Server-5.7/Percona-Server-5.7.34-37/binary/redhat/7/x86_64/Percona-Server-5.7.34-37-r7c516e9-el7-x86_64-bundle.tar

tar xvf  Percona-Server-5.7.34-37-r7c516e9-el7-x86_64-bundle.tar

rpm -ivh *.rpm


## 配置用户组

groupadd mysql

useradd -r -g mysql mysql 

mysqld --initialize --user=mysql --datadir=/user/local/webserver/mysql ## 如果没报错,恭喜你很幸运


chown -R mysql:mysql /usr/local/webserver/mysql

service mysqld start


---登录mysql

mysql -uroot -p


---

-初始化

/opt/mysql/bin/mysqld --defaults-file=/3306/my.cnf  --user=mysql --initialize-insecure

-启动数据库

/opt/mysql/bin/mysqld_safe --defaults-file=/3306/my.cnf

-连接测试数据库

mysql -uroot  -S /3306/mysql.sock -e "show databases;"


签名:这个人很懒,什么也没有留下!
最新回复 (0)
返回