• 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安装完成。

  • 相关阅读:
    Python3 从零单排10_xml&configparser
    Python3 从零单排9_json&pickle&shelve
    Python3 从零单排7_模块&os&sys
    Python3 从零单排6_装饰器&生成器&迭代器
    Python3 从零单排5_内置函数
    python3 从零单排4_函数进阶
    Python3 从零单排2_文件读写&集合
    查看innodb表空间
    如何从innodb的数据字典里恢复表结构
    innodb double write buffer
  • 原文地址:https://www.cnblogs.com/suesky/p/12767363.html
Copyright © 2020-2023  润新知