当前位置:   article > 正文

linux 利用yum源安装mysql client 5.7_yum mysql client

yum mysql client

前言

  • CentOS Linux release 7.6.1810
  • mysql client 5.7.x

步骤

  1. 添加mysql源

    shell> rpm -ivh http://repo.mysql.com/mysql57-community-release-el7-10.noarch.rpm
    Retrieving http://repo.mysql.com/mysql57-community-release-el7-10.noarch.rpm
    Preparing...                          ################################# [100%]
    Updating / installing...
       1:mysql57-community-release-el7-10 ################################# [100%]
    
    • 1
    • 2
    • 3
    • 4
    • 5

    注:卸载mysql源 rpm -e --nodeps mysql57-community-release-el7-10.noarch

  2. 查看mysql源中的mysql client版本

    shell> yum info mysql-community-client
    Available Packages
    Name        : mysql-community-client
    Arch        : i686
    Version     : 5.7.40
    Release     : 1.el7
    Size        : 27 M
    Repo        : mysql57-community/x86_64
    Summary     : MySQL database client applications and tools
    URL         : http://www.mysql.com/
    License     : Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved. Under GPLv2 license as shown in the Description field.
    Description : This package contains the standard MySQL clients and administration
                : tools.
    
    Name        : mysql-community-client
    Arch        : x86_64
    Version     : 5.7.40
    Release     : 1.el7
    Size        : 28 M
    Repo        : mysql57-community/x86_64
    Summary     : MySQL database client applications and tools
    URL         : http://www.mysql.com/
    License     : Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved. Under GPLv2 license as shown in the Description field.
    Description : This package contains the standard MySQL clients and administration
                : tools.
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
  3. 安装mysql

    shell> yum install mysql-community-client
    
    • 1
  4. 检查是否安装成功

shell> mysql -V
mysql  Ver 14.14 Distrib 5.7.40, for Linux (x86_64) using  EditLine wrapper
  • 1
  • 2

Public key for mysql-community-libs-compat-5.7.40-1.el7.x86_64.rpm is not installed

Public key for mysql-community-libs-compat-5.7.40-1.el7.x86_64.rpm is not installed


 Failing package is: mysql-community-libs-compat-5.7.40-1.el7.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
  • 1
  • 2
  • 3
  • 4
  • 5

修改 gpgcheck=1 => gpgcheck=0

卸载步骤

查询已安装的rpm

shell> rpm -qa|grep  mysql
mysql-community-libs-5.7.40-1.el7.x86_64
mysql57-community-release-el7-10.noarch
mysql-community-common-5.7.40-1.el7.x86_64
mysql-community-libs-compat-5.7.40-1.el7.x86_64
  • 1
  • 2
  • 3
  • 4
  • 5

逐一卸载

shell> yum -y remove  mysql-community-common-5.7.40-1.el7.x86_64
shell> yum -y remove mysql57-community-release-el7-10.noarch
shell> yum -y remove  mysql-community-libs-compat-5.7.40-1.el7.x86_64
shell> yum -y remove  mysql-community-libs-5.7.40-1.el7.x86_64
  • 1
  • 2
  • 3
  • 4
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/229393
推荐阅读
相关标签
  

闽ICP备14008679号