美文网首页
安装MySql 5.7客户端

安装MySql 5.7客户端

作者: 逍遥无铭 | 来源:发表于2019-01-05 20:25 被阅读0次

    1. 先下载MySQL Yum Repository

    wget https://repo.mysql.com//mysql80-community-release-el7-1.noarch.rpm

    2.Install the downloaded release package

    sudo yum localinstall mysql80-community-release-el7-1.noarch.rpm;

    3. 编辑mysql-community.repo, 将enable 5.7, disable 8.0

    8.0默认是enabled,其它版本默认是disabled.(enabled=0为disabled,1为enabled,其它的不要修改)

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

    # Enable to use MySQL 5.7

    [mysql57-community]

    name=MySQL 5.7 Community Server

    baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/

    enabled=1

    gpgcheck=1

    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

    [mysql80-community]

    name=MySQL 8.0 Community Server

    baseurl=http://repo.mysql.com/yum/mysql-8.0-community/el/7/$basearch/

    enabled=0

    gpgcheck=1

    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

    4. 查看当前enbled的版本是否正确:

    yum repolist enabled | grep mysql

    5.  安装mysql-community-client:

    yum install mysql-community-client;

    相关文章

      网友评论

          本文标题:安装MySql 5.7客户端

          本文链接:https://www.haomeiwen.com/subject/bbmdrqtx.html