转自:http://www.cnblogs.com/hwd-cnblogs/p/5213337.html

CentOS7的yum源中默认好像是没有mysql的。为了解决这个问题,我们要先下载mysql的repo源。

1. 下载mysql的repo源

1
$ wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm

2. 安装mysql-community-release-el7-5.noarch.rpm包

1
sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm

安装这个包后,会获得两个mysql的yum repo源:/etc/yum.repos.d/mysql-community.repo,/etc/yum.repos.d/mysql-community-source.repo。

3. 安装mysql

1
sudo yum install mysql-server

根据步骤安装就可以了,不过安装完成后,密码为随机密码,需要重置密码。

4. 重置密码

grep "password" /var/log/mysqld.log 

查看mysql随机生成的密码(类似黄色框中的密码)

接下来重置密码:

1
<strong style="font-family: verdana, Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.5;">5.使用新密码登录</strong>

转载:centos7下使用yum安装mysql的更多相关文章

  1. centos7下使用yum安装mysql

    CentOS7的yum源中默认好像是没有mysql的.为了解决这个问题,我们要先下载mysql的repo源. 1. 下载mysql的repo源 wget http://repo.mysql.com/m ...

  2. centos7下使用yum安装mysql数据库以及设置远程访问

    CentOS7的yum源中默认好像是没有mysql的.为了解决这个问题,我们要先下载mysql的repo源. 1. 下载mysql的repo源 $ wget http://repo.mysql.com ...

  3. centos7下使用yum安装mysql数据库

    CentOS7的yum源中默认是没有mysql的.为了解决这个问题,我们要先下载mysql的repo源. 1.下载并安装MySQL官方的 Yum Repository wget -i -c http: ...

  4. CentOS7下使用YUM安装mariadb10

    1:由于centos7 默认使用yum安装MySQL的话就会安装mariadb,只是安装的版本停留在mariadb5.x,版本比较低.如果我们需要安装mariadb10这里就需要删除mariadb-l ...

  5. CentOS 7.0下使用yum安装MySQL

    CentOS7默认数据库是mariadb,配置等用着不习惯,因此决定改成mysql,但是CentOS7的yum源中默认好像是没有mysql的.为了解决这个问题,我们要先下载mysql的repo源. 1 ...

  6. linux下使用yum安装mysql、tomcat、httpd

    一.linux下使用yum安装mysql   1.安装 查看有没有安装过:           yum list installed mysql*           rpm -qa | grep m ...

  7. centos7下使用yum安装pip

    centos7下使用yum安装pip 首先安装epel扩展源: yum -y install epel-release 更新完成之后,就可安装pip: yum -y install python-pi ...

  8. [mysql] linux下使用yum安装mysql

    From: http://www.2cto.com/database/201207/141878.html linux下使用yum安装mysql   1.安装 查看有没有安装过:           ...

  9. centos7下使用yum安装redis

    centos7下使用yum安装Redis 第一步:安装 yum –y install redis 第二步:启动 systemctl start redis.service 第三步:设置开机启动 sys ...

随机推荐

  1. problem during schema create,statement create sequence act_evt_log_seq

    今天在调试程序的时候出现"problem during schema create,statement create sequence act_evt_log_seq"这个错误,跟 ...

  2. javascript type操作

    var a; type a;//结果为undefined type b;//结果也是undefinedalert(a);//弹出undefinedalert(b);//错误代码  上述代码,type ...

  3. C语音常用库和函数

    #include <assert.h> //设定插入点 #include <ctype.h> //字符处理 #include <errno.h> //定义错误码 # ...

  4. 尚学堂Spring视频教程(四):使用Annotation

    之前我们的bean都配置在XML里,并且通过bean的property标签来指定依赖关系,如果项目很大,那岂不是要配置很多这样的property标签?Spring提供了注解的方式来解决这个问题 @Au ...

  5. 使用Maven加载项目有Dubbo框架时出现的常见异常情况

    异常描述:            The matching wildcard is strict, but no declaration can be found for element 'dubbo ...

  6. AX7: CREATE NEW PACKAGE\MODEL

    To create a new package\model on AX first you should understand the concept of Packages and Models o ...

  7. 扩展easyui.datagrid,添加数据loading遮罩效果代码 --来自网摘收集

    //jquery.datagrid 扩展 (function (){ $.extend($.fn.datagrid.methods, { //显示遮罩 loading: function(jq){ r ...

  8. Maven多环境打包

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/20 ...

  9. xampp windows版本安装后无法使用大文件下载的解决办法

    找到httpd.conf 在<Directory "C:/xampp/htdocs"> </Directory>添加EnableSendfile On

  10. VS2013安装

    下载 等待下载完成之后,虽然下载文件是ios格式,但可以用解压缩工具解压打开.解压好后,双击vs_ultimate.exe,开始安装. 自定义选择安装路径,同意许可条款,进行下一步. 在选择安装的可选 ...