概述
环境介绍:本安装教程基于虚拟机CentOS7.6版本进行安装,mysql版本为5.7版本。
一、卸载已安装的mysql服务
由于我原本在虚拟机已安装过mysql,所以这里我需要先卸载掉mysql才能进行实验安装教程,若你从未安装过mysql无需进行这一步操作。
查看是否安装有mysql服务可以通过以下命令:
[root@localhost ~]# rpm -qa | grep mysql
mysql80-community-release-el7-3.noarch
mysql-community-client-5.7.26-1.el7.x86_64
mysql-community-libs-5.7.26-1.el7.x86_64
mysql-community-server-5.7.26-1.el7.x86_64
mysql-community-common-5.7.26-1.el7.x86_64
mysql-community-libs-compat-5.7.26-1.el7.x86_64
[root@localhost ~]#
查看mysql是否正在运行,若在运行,应先将服务停止再进行卸载
[root@localhost ~]# service mysqld status
Redirecting to /bin/systemctl status mysqld.service
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Sat 2019-07-20 13:59:09 CST; 28s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 7698 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
Process: 6813 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 7826 (code=exited, status=0/SUCCESS)
Jul 20 13:50:13 localhost.localdomain systemd[1]: Starting MySQL Server...
Jul 20 13:50:17 localhost.localdomain systemd[1]: Started MySQL Server.
Jul 20 13:59:08 localhost.localdomain systemd[1]: Stopping MySQL Server...
Jul 20 13:59:09 localhost.localdomain systemd[1]: Stopped MySQL Server.
[root@localhost ~]# service mysqld stop
开始卸载
[root@localhost ~]# rpm -e $(rpm -qa | grep mysql-)
error: Failed dependencies:
libmysqlclient.so.18()(64bit) is needed by (installed) postfix-2:2.10.1-7.el7.x86_64
libmysqlclient.so.18(libmysqlclient_18)(64bit) is needed by (installed) postfix-2:2.10.1-7.el7.x86_64
[root@localhost ~]#
由于有些库被其他服务依赖无法卸载,需要先卸载依赖该库的服务。这里我们直接用--nodeps参数忽略依赖
[root@localhost ~]# rpm -e $(rpm -qa | grep mysql-) --nodeps
[root@localhost ~]#
[root@localhost ~]# rpm -qa | grep mysql
[root@localhost ~]#
卸载完成
二、下载源码包
官网5.7源码包下载地址:https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.26-el7-x86_64.tar.gz
[root@localhost src]# wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.26-el7-x86_64.tar.gz
不过linux下下载这个文件真的有些慢,不信你看
于是我只能本地使用IDM下载,再上传到linux中。IDM属实给力啊!
标签:5.7,安装,linux,源码,mysqld,mysql,root,el7,localhost
来源: https://www.cnblogs.com/welisit/p/11217613.html
最后
以上就是敏感微笑为你收集整理的linux yum源码安装mysql_linux下通过源码包安装mysql,以及yum安装的全部内容,希望文章能够帮你解决linux yum源码安装mysql_linux下通过源码包安装mysql,以及yum安装所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复