Centos7使用yum命令安装Mysql5.6.X
2018-01-18 22:58
465 查看
首先:具体的安装步骤在mysql官方文档上都有详细的描述。
文档虽然是英文,不过很容易理解,我就不一一翻译了。
官方文档地址: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.
You can check that the MySQL Yum repository has been successfully added by the following command:
Selecting a Release Series
vim /etc/yum.repos.d/mysql-community.repo
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:
2、Install MySQL by the following command:
Start the MySQL server with the following command:
Check the status of the MySQL server with the following command:
有问题欢迎留言交流。
技术交流群:282575808
--------------------------------------
声明: 原创文章,未经允许,禁止转载!
--------------------------------------
文档虽然是英文,不过很容易理解,我就不一一翻译了。
官方文档地址: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
有问题欢迎留言交流。
技术交流群:282575808
--------------------------------------
声明: 原创文章,未经允许,禁止转载!
--------------------------------------
相关文章推荐
- CentOS7安装mysql之使用yum命令
- 阿里云centos7使用yum安装mysql的正确姿势
- CentOS7下使用yum安装mysql
- 阿里云Centos7使用yum安装MySQL5.6的正确姿势
- centos7下使用yum安装mysql
- centos7上使用yum安装mysql
- Linux Centos 下使用yum 命令安装mysql
- CentOS7 使用 yum 安装 mysql 遇到的一个问题
- Centos7 用yum命令安装LAMP环境(php+Apache+Mysql)以及php扩展
- Fedora下使用yum命令安装MySQL
- CentOS7 使用yum命令安装Java SDK
- centos7下使用yum安装mysql
- 阿里云Centos7使用yum安装MySQL5.6--未测试
- 阿里云Centos7使用yum安装MySQL5.6的正确姿势
- CentOS7 yum 命令使用心得-代理上网,从光盘安装软件
- 在CentOS7中利用yum命令安装mysql
- CentOS7 使用yum命令安装Java JDK1.8
- Fedora下使用yum命令安装MySQL
- Centos7使用yum安装MySQL及实现远程连接的方法
- centos7下使用yum安装mysql