首页 > 数据库 >yum安装mysql时出现Public key for mysql-community-common-5.7.42-1.el7.x86_64.rpm is not installed告警

yum安装mysql时出现Public key for mysql-community-common-5.7.42-1.el7.x86_64.rpm is not installed告警

时间:2023-07-01 11:31:34浏览次数:50  
标签:x86 5.7 community 64 mysql el7

问题描述:yum安装mysql时出现Public key for mysql-community-common-5.7.42-1.el7.x86_64.rpm is not installed告警,如下所示:
数据库:mysql 5.7.42
系统:rhel 7.3
1、问题重现
[root@leo-mysql-master ~]# yum install -y mysql-community-server
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
mysql-connectors-community                                                                                             | 2.6 kB  00:00:00     
mysql-tools-community                                                                                                  | 2.6 kB  00:00:00     
mysql57-community                                                                                                      | 2.6 kB  00:00:00     
(1/3): mysql-connectors-community/x86_64/primary_db                                                                    |  99 kB  00:00:00     
(2/3): mysql-tools-community/x86_64/primary_db                                                                         |  92 kB  00:00:00     
(3/3): mysql57-community/x86_64/primary_db                                                                             | 340 kB  00:00:00     
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-server.x86_64 0:5.7.42-1.el7 will be installed
--> Processing Dependency: mysql-community-common(x86-64) = 5.7.42-1.el7 for package: mysql-community-server-5.7.42-1.el7.x86_64
--> Processing Dependency: mysql-community-client(x86-64) >= 5.7.9 for package: mysql-community-server-5.7.42-1.el7.x86_64
--> Running transaction check
---> Package mysql-community-client.x86_64 0:5.7.42-1.el7 will be installed
--> Processing Dependency: mysql-community-libs(x86-64) >= 5.7.9 for package: mysql-community-client-5.7.42-1.el7.x86_64
---> Package mysql-community-common.x86_64 0:5.7.42-1.el7 will be installed
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.52-1.el7 will be obsoleted
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64
---> Package mysql-community-libs.x86_64 0:5.7.42-1.el7 will be obsoleting
--> Running transaction check
---> Package mysql-community-libs-compat.x86_64 0:5.7.42-1.el7 will be obsoleting
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================
 Package                                      Arch                    Version                        Repository                          Size
==============================================================================================================================================
Installing:
 mysql-community-libs                         x86_64                  5.7.42-1.el7                   mysql57-community                  2.6 M
     replacing  mariadb-libs.x86_64 1:5.5.52-1.el7
 mysql-community-libs-compat                  x86_64                  5.7.42-1.el7                   mysql57-community                  1.2 M
     replacing  mariadb-libs.x86_64 1:5.5.52-1.el7
 mysql-community-server                       x86_64                  5.7.42-1.el7                   mysql57-community                  179 M
Installing for dependencies:
 mysql-community-client                       x86_64                  5.7.42-1.el7                   mysql57-community                   28 M
 mysql-community-common                       x86_64                  5.7.42-1.el7                   mysql57-community                  311 k

Transaction Summary
==============================================================================================================================================
Install  3 Packages (+2 Dependent packages)

Total download size: 211 M
Downloading packages:
warning: /var/cache/yum/x86_64/7Server/mysql57-community/packages/mysql-community-common-5.7.42-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY
Public key for mysql-community-common-5.7.42-1.el7.x86_64.rpm is not installed
(1/5): mysql-community-common-5.7.42-1.el7.x86_64.rpm                                                                  | 311 kB  00:00:00     
(2/5): mysql-community-libs-5.7.42-1.el7.x86_64.rpm                                                                    | 2.6 MB  00:00:01     
(3/5): mysql-community-libs-compat-5.7.42-1.el7.x86_64.rpm                                                             | 1.2 MB  00:00:00     
(4/5): mysql-community-client-5.7.42-1.el7.x86_64.rpm                                                                  |  28 MB  00:00:05     
(5/5): mysql-community-server-5.7.42-1.el7.x86_64.rpm                                                                                                                                                             | 179 MB  00:00:25     
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                    7.6 MB/s | 211 MB  00:00:27     
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Importing GPG key 0x5072E1F5:
 Userid     : "MySQL Release Engineering <[email protected]>"
 Fingerprint: a4a9 4068 76fc bd3c 4567 70c8 8c71 8d3b 5072 e1f5
 Package    : mysql57-community-release-el7-8.noarch (installed)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql


Public key for mysql-community-common-5.7.42-1.el7.x86_64.rpm is not installed


 Failing package is: mysql-community-common-5.7.42-1.el7.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

2、异常原因
由于MySQL GPG密匙过期导致.

3、解决方案
--在安装mysql之前导入2022年密匙.
[root@leo-mysql-master ~]# rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
--重新安装
[root@leo-mysql-master ~]# yum install -y mysql-community-server                     
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-server.x86_64 0:5.7.42-1.el7 will be installed
--> Processing Dependency: mysql-community-common(x86-64) = 5.7.42-1.el7 for package: mysql-community-server-5.7.42-1.el7.x86_64
--> Processing Dependency: mysql-community-client(x86-64) >= 5.7.9 for package: mysql-community-server-5.7.42-1.el7.x86_64
--> Running transaction check
---> Package mysql-community-client.x86_64 0:5.7.42-1.el7 will be installed
--> Processing Dependency: mysql-community-libs(x86-64) >= 5.7.9 for package: mysql-community-client-5.7.42-1.el7.x86_64
---> Package mysql-community-common.x86_64 0:5.7.42-1.el7 will be installed
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.52-1.el7 will be obsoleted
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-6.el7.x86_64
---> Package mysql-community-libs.x86_64 0:5.7.42-1.el7 will be obsoleting
--> Running transaction check
---> Package mysql-community-libs-compat.x86_64 0:5.7.42-1.el7 will be obsoleting
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================
 Package                                      Arch                    Version                        Repository                          Size
==============================================================================================================================================
Installing:
 mysql-community-libs                         x86_64                  5.7.42-1.el7                   mysql57-community                  2.6 M
     replacing  mariadb-libs.x86_64 1:5.5.52-1.el7
 mysql-community-libs-compat                  x86_64                  5.7.42-1.el7                   mysql57-community                  1.2 M
     replacing  mariadb-libs.x86_64 1:5.5.52-1.el7
 mysql-community-server                       x86_64                  5.7.42-1.el7                   mysql57-community                  179 M
Installing for dependencies:
 mysql-community-client                       x86_64                  5.7.42-1.el7                   mysql57-community                   28 M
 mysql-community-common                       x86_64                  5.7.42-1.el7                   mysql57-community                  311 k

Transaction Summary
==============================================================================================================================================
Install  3 Packages (+2 Dependent packages)

Total size: 211 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : mysql-community-common-5.7.42-1.el7.x86_64                                                                                 1/6 
  Installing : mysql-community-libs-5.7.42-1.el7.x86_64                                                                                   2/6 
  Installing : mysql-community-client-5.7.42-1.el7.x86_64                                                                                 3/6 
  Installing : mysql-community-server-5.7.42-1.el7.x86_64                                                                                 4/6 
  Installing : mysql-community-libs-compat-5.7.42-1.el7.x86_64                                                                            5/6 
  Erasing    : 1:mariadb-libs-5.5.52-1.el7.x86_64                                                                                         6/6 
  Verifying  : mysql-community-common-5.7.42-1.el7.x86_64                                                                                 1/6 
  Verifying  : mysql-community-libs-compat-5.7.42-1.el7.x86_64                                                                            2/6 
  Verifying  : mysql-community-libs-5.7.42-1.el7.x86_64                                                                                   3/6 
  Verifying  : mysql-community-client-5.7.42-1.el7.x86_64                                                                                 4/6 
  Verifying  : mysql-community-server-5.7.42-1.el7.x86_64                                                                                 5/6 
  Verifying  : 1:mariadb-libs-5.5.52-1.el7.x86_64                                                                                         6/6 

Installed:
  mysql-community-libs.x86_64 0:5.7.42-1.el7  mysql-community-libs-compat.x86_64 0:5.7.42-1.el7  mysql-community-server.x86_64 0:5.7.42-1.el7 

Dependency Installed:
  mysql-community-client.x86_64 0:5.7.42-1.el7                          mysql-community-common.x86_64 0:5.7.42-1.el7                         

Replaced:
  mariadb-libs.x86_64 1:5.5.52-1.el7                                                                                                          

Complete!

说明:如上所示,无异常告警.

参考文档:https://blog.csdn.net/weixin_44049210/article/details/129134782

标签:x86,5.7,community,64,mysql,el7
From: https://blog.51cto.com/u_12991611/6598708

相关文章

  • mysql 联合表查询从表即使有索引依然ALL的一个原因-索引ALL解决,字符编码方式不一致导
    mysql联合表查询从表即使有索引依然ALL的一个原因-索引ALL解决,字符编码方式不一致导致全表搜索那就是主表和从表的关联字段的编码方式不一样!!!产生的现象:解决之后,正确的使用了t2.order_noref索引,而不是ALL检查mysql主体编码方式,是否由于后来新建的表的关联字段和之前的主表的......
  • MYSQL:首次找不到.log文件
    一开始在文件中没有SXR.log文件。 后退,在my.ini中更改 一开始general-log=0,将其改为1即可。 ......
  • MySQL批量新增或修改时出现异常: Lock wait timeout exceeded; try restarting transact
    标题:解决MySQL批量新增或修改时出现"nestedexceptionisjava.sql.SQLException:Lockwaittimeoutexceeded;tryrestartingtransaction"异常摘要在使用MySQL数据库进行批量新增或修改操作时,有时候会遇到"nestedexceptionisjava.sql.SQLException:Lockwaittimeoutexcee......
  • 30秒了解Mysql
    本篇主要是一文带大家大致了解什么是Mysql。本篇文章主要涉及的内容有:什么是数据库?数据库中的几个基本术语?Mysql中InnoDB引擎支持的4种事务隔离级别Mysql中如何使用ENUM?Mysql中的存储引擎mysql中char与varchar的区别?主键和候选键的区别?blob和text的区别?Mysql中的锁数据库三范式什么......
  • 30秒了解Mysql
    本篇主要是一文带大家大致了解什么是Mysql。本篇文章主要涉及的内容有:什么是数据库?数据库中的几个基本术语?Mysql中InnoDB引擎支持的4种事务隔离级别Mysql中如何使用ENUM?Mysql中的存储引擎mysql中char与varchar的区别?主键和候选键的区别?blob和text的区别?Mysql中的锁数据......
  • mysql5.7.13 使用笔记
    社区版下载地址:https://dev.mysql.com/downloads/mysql/ 安装:http://www.linuxidc.com/Linux/2016-04/130414.htm     (配置文件my.cnf在网页的最下面)更新yum源:tar解压失败:http://alany.blog.51cto.com/6125308/1422299###############################################......
  • MySQL入门使用,以及创建账号和权限
    当客户端连接MySQL服务器时,必须提供有效的身份认证,例如用户名和密码。当用户执行任何数据库操作时,服务器将会验证用户是否具有相应的权限,例如查询表需要SELECT权限,删除对象需要DROP权限。为了方便用户权限的管理,MySQL8.0提供了角色的功能。角色(Role)是一组权限的集合。管理......
  • 云服务器centos7安装mysql8
    1.先去官网准备好几个安装包: 2.tar-xvfmysql-8.0.26-1.el8.x86_64.rpm-bundle.tar 3.可能需要卸载系统中自带的mariadbrpm-qa|grepmariadb rpm-e--nodepsmariadb-connector-c-3.1.11-2.oc8.1.x86_64rpm-e--nodepsmariadb-connector-c-config-3.1.11-2.oc8.1.......
  • MySQL学习3--联表查询
    1、常规联表查询创建两张数据库表如下:mysql>select*fromdept;+----+-----------+|id|deptName|+----+-----------+|3|教学部|+----+-----------+1rowinset(0.00sec)mysql>select*fromemployee;+----+---------+--------+------------------......
  • centos7使用rpm方式安装mysql
    --使用rpm安装mysql的默认目录:1、数据库目录/var/lib/mysql/2、配置文件/usr/share/mysql(mysql.server命令及配置文件)3、相关命令/usr/bin(mysqladminmysqldump等命令)4、启动脚本/etc/rc.d/init.d/(启动脚本文件mysql的目录) ***********************************************......