阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

CentOS 7 安装 MySQL 小记

199次阅读
没有评论

共计 2986 个字符,预计需要花费 8 分钟才能阅读完成。

检查依赖:

yum search libaio  # 检索相关信息
yum install libaio # 安装依赖包

成功安装显示:

[root@mysql 桌面]# yum install libaio
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.cn99.com
 * extras: mirrors.cn99.com
 * updates: mirrors.zju.edu.cn
软件包 libaio-0.3.109-13.el7.x86_64 已安装并且是最新版本
无须任何处理

检查 mysql 是否安装:

yum list installed | grep mysql

如果有安装显示:

[root@mysql 桌面]# yum list installed | grep mysql
mysql-community-client.x86_64          5.7.18-1.el7                    @mysql57-community
mysql-community-common.x86_64          5.7.18-1.el7                    @mysql57-community
mysql-community-libs.x86_64            5.7.18-1.el7                    @mysql57-community
mysql-community-libs-compat.x86_64     5.7.18-1.el7                    @mysql57-community
mysql-community-server.x86_64          5.7.18-1.el7                    @mysql57-community
mysql57-community-release.noarch       el7-11                          @/mysql57-community-release-el7-11.noarch

卸载 mysql:

yum -y remove mysql-community-*

去官网下载:MySQL Yum Repository

添加 MySQL Yum Repository 到你的系统 repository 列表中,执行
CentOS 7 安装 MySQL 小记

[root@mysql 下载]# yum localinstall ./mysql57-community-release-el7-11.noarch.rpm 

验证是否添加成功:

[root@mysql 下载]# yum repolist enabled | grep "mysql.*-community.*"
mysql-connectors-community/x86_64        MySQL Connectors Community           3
mysql-tools-community/x86_64             MySQL Tools Community                4
mysql57-community/x86_64                 MySQL 5.7 Community Server          18

添加成功, 使用 yum 来安装:

[root@mysql 下载]# yum install mysql-community-server 

遇到提示就输 Y
安装完成后, 此时 mysql 它包含了 mysql-community-server、mysql-community-client、mysql-community-common、mysql-community-libs 四个包:
最后查看一下, 是否安装完成:

[root@mysql 下载]# rpm -qi mysql-community-server 
Name        : mysql-community-server
Version     : 5.7.18
Release     : 1.el7
Architecture: x86_64
Install Date: 20170521日 星期日 004347Group       : Applications/Databases
Size        : 765406738
License     : Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. Under GPLv2 license as shown in the Description field.
Signature   : DSA/SHA1, 20170320日 星期一 174120秒, Key ID 8c718d3b5072e1f5
Source RPM  : mysql-community-5.7.18-1.el7.src.rpm
Build Date  : 20170318日 星期六 160815Build Host  : siv17.no.oracle.com
Relocations : (not relocatable)
Packager    : MySQL Release Engineering <mysql-build@oss.oracle.com>
Vendor      : Oracle and/or its affiliates
URL         : http://www.mysql.com/
Summary     : A very fast and reliable SQL database server
Description :
The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
and robust SQL (Structured Query Language) database server. MySQL Server
is intended for mission-critical, heavy-load production systems as well
as for embedding into mass-deployed software. MySQL is a trademark of
Oracle and/or its affiliates
The MySQL software has Dual Licensing, which means you can use the MySQL
software free of charge under the GNU General Public License
(http://www.gnu.org/licenses/). You can also purchase commercial MySQL
licenses from Oracle and/or its affiliates if you do not wish to be bound by the terms of
the GPL. See the chapter "Licensing and Support" in the manual for
further info.
The MySQL web site (http://www.mysql.com/) provides the latest news and
information about the MySQL software.  Also please see the documentation
and the manual for more information.
This package includes the MySQL server binary as well as related utilities
to run and administer a MySQL server.

OK, 结束安装

更多 Oracle 相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

本文永久更新链接地址:http://www.linuxidc.com/Linux/2017-10/147452.htm

正文完
星哥玩云-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-22发表,共计2986字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中