Centos7使用yum命令安装Mysql5.6.X
首先:具体的安装步骤在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.
yum localinstall mysql57-community-release-el7-.noarch.rpm

ps:如何卸载 yum localinstall
# 先查看已经安装的rpm包
rpm -qa|grep mysql
mysql-libs-5.1.-.el6_8.x86_64
mysql80-community-release-el7-.noarch # 卸载上一步得到的两个rpm包
yum remove mysql-libs-5.1.-.el6_8.x86_64
yum remove mysql80-community-release-el7-.noarch
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= to disable a subrepository,or enabled= 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=
gpgcheck=
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
如果你只想安装mysql client或者mysqldump等,可执行如下命令
yum install mysql-community-client
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
3、安装后的mySql配置文件位置
/etc/my.cnf
有问题欢迎留言交流。
技术交流群:282575808
--------------------------------------
声明: 原创文章,未经允许,禁止转载!
--------------------------------------
Centos7使用yum命令安装Mysql5.6.X的更多相关文章
- CentOS7使用yum命令安装Java1.8
CentOS7使用yum命令安装Java1.8 首先更新已安装的包:#yum update查看系统当前的java版本:#java -version==================== CentOS ...
- CentOS7下yum方式安装mysql5.6
在Centos7中用MariaDB代替了mysql数据库.所以在新安装MySQL前必须做好对系统的清理工作. 一.清理CentOS7下的MariaDB. [root@localhost ~]#rpm ...
- CentOS7 使用yum命令安装Java SDK(openjdk)
CentOS 6.X 和 7.X 自带有OpenJDK runtime environment (openjdk).它是一个在linux上实现开源的java 平台. 安装方式: 1.输入以下命令,以 ...
- centos7下yum方式安装MySQL5.7
前言: MySQL作为一款免费.开源数据库产品,已经问世就饱受关注,很多中小企业甚至是大企业都钟爱MySQL,随着大数据的不断发展,我们接触的信息量也越来越多,虽然NoSQL是大数据的宠儿,但MySQ ...
- Linux CentOS7通过yum命令安装Mono(尝先安装模式)
前言 经过尝试网上各种安装mono的技术贴,这个安装过程经历了大约2周,尝试了各个版本,几目前博客所描述的所有安装方式.以下内容的安装方式可以为你尝试不同版本的mono.并非正式环境安装标准方式安装. ...
- Centos7 通过yum命令安装jdk1.8
直接安装,不看原因 yum install java-1.8.0-openjdk* -y 1 分割线上下之选一个看即可. —————————————华丽的分割线—————————————— 先查看系统 ...
- Centos7 用yum命令安装LAMP环境(php+Apache+Mysql)以及php扩展
1.yum -y update // 更新系统 1.1)yum -y install gcc g++ gcc-c++ make kernel-devel kernel-headers 1.2)v ...
- CentOS7系统yum方式安装MySQL5.7
参考:https://www.cnblogs.com/bigbrotherer/p/7241845.html#top 1.在CentOS中默认安装有MariaDB,这个是MySQL的分支,但为了需要, ...
- centos7使用yum方式安装MySQL5.7
yum -y localinstall http://mirrors.ustc.edu.cn/mysql-repo/mysql57-community-release-el7.rpm yum inst ...
随机推荐
- spring中BeanFactory和FactoryBean的区别
共同点: 都是接口 区别: BeanFactory 以Factory结尾,表示它是一个工厂类,用于管理Bean的一个工厂 在Spring中,所有的Bean都是由BeanFactory(也就是IOC容器 ...
- 2)实现github自动登陆获取信息
# -*- coding:utf-8 -*- # __author__ = 'lixiang' # 实现github自动登陆和获取数据 import requests from bs4 import ...
- 如何取出DataTable中某几个字段(列名)组合新表
在偶不知道第二种方法之前.偶费了好大劲才把这个问题解决.下面把这两个方法都帖出来,请大家批评指正.或有更好的办法也帖出来,一起交流 第一种方法: string sql = &qu ...
- 通过printf从目标板到调试器的输出
最近在SEGGER的博客上看到Johannes Lask写的一篇关于在调试时使用printf函数从目标MCU输出信息到调试器的文章,自我感觉很有启发,特此翻译此文并推荐给各位同仁.当然限于个人水平,有 ...
- Confluence 6 查看一个任务的执行历史
希望查看一个计划任务最后运行的时间和这个计划任务最后一次运行花费了多长时间.单击计划任务边上的 历史(History )连接. 如果一个计划任务从来没有运行的胡啊,那么这个历史的链接是不会显示的. 屏 ...
- Confluence 6 已经存在的 Confluence 安装配置一个数据源连接
如果你希望在使用 JDBC 直接方式的应用中切换到使用数据源: 停止 Confluence. 备份下面的文件,以防止你可能需要重新恢复你的配置: <installation-directory& ...
- Confluence 6 配置 MySQL 服务器
在这一步,你将要配置你的 MySQL 数据库服务器. 注意: 如果你尝试连接你的 Confluence 到一个已经存在的 MySQL 数据库服务器.我们强烈建议你按照下面描述的安装步骤在 MySQL ...
- ionic3 git 提交报错
npm ERR! cordova-plugin-camera@ gen-docs: `jsdoc2md --template "jsdoc2md/TEMPLATE.md" &quo ...
- usrp使用
首先打开linux 输入uhd_find_divice gqrx
- LeetCode(69):x 的平方根
Easy! 题目描述: 实现 int sqrt(int x) 函数. 计算并返回 x 的平方根,其中 x 是非负整数. 由于返回类型是整数,结果只保留整数的部分,小数部分将被舍去. 示例 1: 输入: ...