MySql教程

centos7通过rpm-bundle方式安装mysql5.7.35

本文主要是介绍centos7通过rpm-bundle方式安装mysql5.7.35,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

准备材料:mysql-5.7.35-1.el7.x86_64.rpm-bundle.tar

wget https://downloads.mysql.com/archives/get/p/23/file/mysql-5.7.35-1.el7.x86_64.rpm-bundle.tar

1.先卸载系统自带的mariadb

查找命令:

rpm -qa | grep -i mariadb

然后根据查找出的列表分别进行卸载,命令为:

rpm -e --nodeps ******

2.解压bundle.tar

注意先要建立一个文件夹再解压:(mkdir ./mysql)

tar xvf  mysql-5.7.35-1.el7.x86_64.rpm-bundle.tar -C ./mysql

3.安装mysql

解压后,按如下顺序进行安装:

rpm -ivh mysql-community-common-5.7.35-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.35-1.el7.x86_64.rpm 
rpm -ivh mysql-community-libs-compat-5.7.35-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.7.35-1.el7.x86_64.rpmrpm -ivh mysql-community-devel-5.7.35-1.el7.x86_64.rpmrpm -ivh mysql-community-server-5.7.35-1.el7.x86_64.rpm

注意:单纯安装mysql,devel组件可不安装,但是如果涉及使用python-devel组件及python访问mysql的相关组件,则需要安装:mysql-community-devel-5.7.35-1.el7.x86_64.rpm,否则会报错:

Error: Package: 1:mariadb-devel-5.5.68-1.el7.x86_64 (os)
           Requires: mariadb-libs(x86-64) = 1:5.5.68-1.el7

实质就是缺少mysql-community-devel组件,导致有关python访问mysql的各种组件安装失败。

本次安装到server时,报错(如不报错,请跳过):

error: Failed dependencies:
    libnuma.so.1()(64bit) is needed by mysql-community-server-5.7.35-1.el7.x86_64
    libnuma.so.1(libnuma_1.1)(64bit) is needed by mysql-community-server-5.7.35-1.el7.x86_64
    libnuma.so.1(libnuma_1.2)(64bit) is needed by mysql-community-server-5.7.35-1.el7.x86_64

则通过如下命令安装依赖项:libnuma

yum install numactl

https://www.cnblogs.com/jizhong/p/15271521.html

 

这篇关于centos7通过rpm-bundle方式安装mysql5.7.35的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!