Centos7使用yum命令安装Mysql
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了Centos7使用yum命令安装Mysql,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2057字,纯文字阅读大概需要3分钟。
内容图文
![Centos7使用yum命令安装Mysql](/upload/InfoBanner/zyjiaocheng/498/f96f2dbe434b407c8e29f2b7d73653fa.jpg)
这里造轮子是让自己加深理解。
官方文档地址:https://dev.mysql.com/doc/refman/5.6/en/linux-installation-yum-repo.html
目前mysql最新版本为:5.7.x
因为5.7版本比之前版本改动比较大,项目中一般还是在用5.6版本。
1、Adding the MySQL Yum Repository
Go to the Download MySQL Yum Repository page (http://dev.mysql.com/downloads/repo/yum/) in the MySQL Developer Zone.
因为centos版本是7.x,至于为什么是mysql57-community-release-el7-11.noarch.rpm,文档中有如下解释:
The repository packages available below will provide MySQL Server 5.7 by default. Other versions can be obtained by editing the repo setup file installed by the package.
yum localinstall mysql57-community-release-el7-11.noarch.rpm
You can check that the MySQL Yum repository has been successfully added by the following command:
yum repolist enabled | grep "mysql.*-community.*"
Selecting a Release Series
vim /etc/yum.repos.d/mysql-community.repo
# Specify enabled=0 to disable a subrepository,or enabled=1 to enable a subrepository. # 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/6/$basearch/ enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
You should only enable subrepository for one release series at any time. When subrepositories for more than one release series are enabled, the latest series will be used by Yum.
Verify that the correct subrepositories have been enabled and disabled by running the following command and checking its output:
yum repolist enabled | grep mysql
2、Install MySQL by the following command:
yum install mysql-community-server
Start the MySQL server with the following command:
systemctl start mysqld.service
Check the status of the MySQL server with the following command:
systemctl status mysqld.service
Centos7使用yum命令安装Mysql
标签:rect 理解 tps zone ref linux doc lan its
本文系统来源:https://www.cnblogs.com/xxoome/p/8313453.html
内容总结
以上是互联网集市为您收集整理的Centos7使用yum命令安装Mysql全部内容,希望文章能够帮你解决Centos7使用yum命令安装Mysql所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。