zoukankan      html  css  js  c++  java
  • centos7.6安装mysql的正确步骤

    1.centos7下安装mysql

    linux下mysql安装包快速下载

    链接: https://pan.baidu.com/s/1eEvgRCAf540bWAM52icVAw 提取码: 9jv0

    官网下载链接:https://downloads.mysql.com/archives/community/

    选择社区下载 MySQL Community Server (Archived Versions)

    Operating System:ret hat

    os看自己安装的系统版本

    这里我选择的RPM Bundle :(mysql-5.7.28-1.el7.x86_64.rpm-bundle.tar)

    2.利用Sftp命令将安装包从win7上传到linux

    alt +p #快速打开SFTP传输窗口

    put -r D:100_day_testcentos7_mysql  #传输整个文件里的文件

    3.安装前提:

    3.1检查系统自带的Mysql,并卸载自带的版本

    查看:yum list installed |grep mysql

    卸载依赖:yum -y remove mysql-libs.x86_64

    3.2更新rpm源:

    wget dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm --no-check-certificate

    3.3安装本地mysql源

    yum localinstall mysql-community-release-el6-5.noarch.rpm

    3.4验证是否安装成功

    yum repolist all | grep mysql

    3.5修改默认版本为5.7

    方法1:

    yum-config-manager --disable mysql56-community

    yum-config-manager --enable mysql57-community-dmr

    方法2:

    编辑配置文件

    vi /etc/yum.repos.d/mysql-community.repo

    把mysql5.6的enabled=0

    把mysql5.7的enabled=1

    保存退出

    4.安装mysql

    yum install mysql-community-server

    5.出现一下错误:

    Error: Package: mysql-community-server-5.7.29-1.el6.x86_64 (mysql57-community-dmr)

              Requires: libsasl2.so.2()(64bit)

    You could try using --skip-broken to work around the problem

    You could try running: rpm -Va --nofiles --nodigest

    6.解决方案

    修改vim /etc/yum.repos.d/mysql-community.repo 源文件

    这里注意,出现这个错误卸载重装不管用,禁用mysql其他版本,只启用5.7

    更改以下2点:

    更改:

    enabled=0

    gpgcheck=0

    7.安装mysql

    yum install mysql-community-server

    8.mysql安装完成。

  • 相关阅读:
    Petapoco 数据库操作类
    .net Cookie操作公共方法 CookieHelper
    .net 服务端缓存 Cache/CacheHelper
    Base64加密解密方法
    对多字段进行去重 ( Linq 方式 )
    BootStrap之 提示工具(Tooltip)插件
    bootstrap之弹出框
    Jquery 强大的表单验证操作
    强大的数据库工具 dbForge Studio ForMySql
    My操作小技巧
  • 原文地址:https://www.cnblogs.com/suesky/p/12767363.html
Copyright © 2011-2022 走看看