• linux 利用yum源安装mysql client 5.7


    前言

    • 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
  • 相关阅读:
    工龄10年的测试员从大厂“裸辞”后...
    SpringBoot:返回响应,统一封装
    GitHub上8.5K 收藏! Python 代码内存分析的利器
    element-plus 导入导出
    Docker笔记-09 Docker Compose
    rabbitmq载在.net中批量消费的问题记录
    Android之RecyclerView仿ViewPage滑动
    【毕业设计】深度学习+opencv+python实现昆虫识别 -图像识别 昆虫识别
    【5G NAS】5G SUPI 和 SUCI 标识符详解
    Unity VR的UI制作和交互
  • 原文地址:https://blog.csdn.net/sayyy/article/details/127664925