linux按照mysql为何如此简单_Linux系统为什么可以蠢到安装一个软件也那么困难?…

安装MySQL5.6和567区别为什么那么大辑根本不同。为什么部分用Linux的人有优越感呢/p>

啥叫5.6和567咩暂时认为你说的5.6和5.7吧。

那我来装一次小白(设定上我会用Linux简单的命令,但安装mysql零经验),试试安装一下。

既然是mysql,那就找官 喽。官 不会找。。。。。我们没啥可说的了Download MySQL Yum Repository?dev.mysql.com

那我们就用暂时最常用的Centos7了。

下载repoRed Hat Enterprise Linux 7 / Oracle Linux 7 (Architecture Independent), RPM Package

下载下来是个rpm文件,那就拿rpm命令怼上rpm -i mysql80-community-release-el7-3.noarch.rpm

然后yum search mysql一下,发现mysql到位了,只不过是mysql8

我们要是5.6和5.7。那就搜一下其他版本

yum –showduplicates search mysql-community-server

========================================== N/S matched: mysql-community-server ==========================================

mysql-community-server-8.0.11-1.el7.x86_64 : A very fast and reliable SQL database server

mysql-community-server-8.0.12-1.el7.x86_64 : A very fast and reliable SQL database server

mysql-community-server-8.0.13-1.el7.x86_64 : A very fast and reliable SQL database server

mysql-community-server-8.0.14-1.el7.x86_64 : A very fast and reliable SQL database server

mysql-community-server-8.0.15-1.el7.x86_64 : A very fast and reliable SQL database server

mysql-community-server-8.0.16-1.el7.x86_64 : A very fast and reliable SQL database server

mysql-community-server-8.0.16-2.el7.x86_64 : A very fast and reliable SQL database server

mysql-community-server-8.0.17-1.el7.x86_64 : A very fast and reliable SQL database server

mysql-community-server-8.0.18-1.el7.x86_64 : A very fast and reliable SQL database server

结果出来的都是8,略坑啊。

但刚才在mysql 站上下载repo的时候并没提示我们版本,估计是打包放一个repo文件里了。翻翻/etc/yum.repos.d/

cat /etc/yum.repos.d/mysql-community.repo

# Enable to use MySQL 5.6

[mysql56-community]

name=MySQL 5.6 Community Server

baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/7/$basearch/

enabled=0

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

# Enable to use MySQL 5.7

[mysql57-community]

name=MySQL 5.7 Community Server

baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/

enabled=0

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

果然都在这呢,那就好办了。

yum –showduplicates –enablerepo mysql56-community –disablerepo mysql80-community search mysql-community-server

========================================== N/S matched: mysql-community-server ==========================================

mysql-community-server-5.6.42-2.el7.x86_64 : A very fast and reliable SQL database server

mysql-community-server-5.6.43-2.el7.x86_64 : A very fast and reliable SQL database server

mysql-community-server-5.6.44-2.el7.x86_64 : A very fast and reliable SQL database server

mysql-community-server-5.6.45-2.el7.x86_64 : A very fast and reliable SQL database server

mysql-community-server-5.6.46-2.el7.x86_64 : A very fast and reliable SQL database server

Name and summary matches only, use “search all” for everything.

装呗

yum –enablerepo mysql56-community –disablerepo mysql80-community install mysql-community-server-5.6.46-2.el7.x86_64

启动一下

[root@mysql-test ~]# service mysqld start

Redirecting to /bin/systemctl start mysqld.service

[root@mysql-test ~]# mysql

Welcome to the MySQL monitor. Commands end with ; or g.

Your MySQL connection id is 2

Server version: 5.6.46 MySQL Community Server (GPL)

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the current input statement.

mysql>

这不就装好了么谁来给我解释一下难在哪里/p>

我琢磨这题主的智商没这么低吧道5.7有坑再试试5.7

卸载5.6,安装5.7

yum –enablerepo mysql56-community –disablerepo mysql80-community remove mysql-community-server-5.6.46-2.el7.x86_64

yum –showduplicates –enablerepo mysql57-community –disablerepo mysql80-community search mysql-community-server

yum –enablerepo mysql57-community –disablerepo mysql80-community install mysql-community-server-5.7.28-1.el7.x86_64

装好,启动

[root@mysql-test ~]# service mysqld start

Redirecting to /bin/systemctl start mysqld.service

[root@mysql-test ~]# mysql

Welcome to the MySQL monitor. Commands end with ; or g.

Your MySQL connection id is 2

Server version: 5.7.28 MySQL Community Server (GPL)

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the current input statement.

mysql>

这不又装好了么/p>

太不给面子了!!坑呢/p>

我倒是想装一次小白,可根本没机会啊,yum install全搞定了。把写帖子的时间都算进去,也就30分钟不到,这很困难么过来,我猜你在windows下折腾一个mysql可就没这么顺利了。

其实我们真不是有优越感,而是很多事情让我们很迷,这有什么可难的/p>

我找了个Windows下装MySQL的教程来,给你们体会一下win10系统,mysql-installer-community-5.7.19.0.msi安装 – 叮咚丶哈哈 – 博客园?www.cnblogs.com

769a74f3acc6cca2ed09935b374eb47e.png

VS

rpm -i mysql80-community-release-el7-3.noarch.rpm

yum –enablerepo mysql57-community –disablerepo mysql80-community install mysql-community-server-5.7.28-1.el7.x86_64

service mysqld start

mysql

前者30多步,后者一个复制粘贴就搞定了,你们为什么会觉得后者更困难/p> 文章知识点与官方知识档案匹配,可进一步学习相关知识CS入门技能树Linux入门在线安装软件24758 人正在系统学习中 相关资源:糖烟茶酒行业管理软件 烟酒进销存店铺销售收银管理系统

声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2021年1月16日
下一篇 2021年1月16日

相关推荐