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

 

原创文章,作者:745907710,如若转载,请注明出处:https://blog.ytso.com/tech/database/267156.html

(0)
上一篇 2022年6月14日 19:24
下一篇 2022年6月14日 19:25

相关推荐

发表回复

登录后才能评论