centos7通过rpm-bundle方式安装mysql5.7.35
2022/6/10 2:19:50
本文主要是介绍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的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-12-25如何部署MySQL集群资料:新手入门教程
- 2024-12-24MySQL集群部署资料:新手入门教程
- 2024-12-24MySQL集群资料详解:新手入门教程
- 2024-12-24MySQL集群部署入门教程
- 2024-12-24部署MySQL集群学习:新手入门教程
- 2024-12-24部署MySQL集群入门:一步一步搭建指南
- 2024-12-07MySQL读写分离入门:轻松掌握数据库读写分离技术
- 2024-12-07MySQL读写分离入门教程
- 2024-12-07MySQL分库分表入门详解
- 2024-12-07MySQL分库分表入门指南