MySQL 官方 GPG 密钥过期问题

Almalinux下安装mysql8:

dnf install -y https://dev.mysql.com/get/mysql80-community-release-el9-1.noarch.rpm

dnf install -y mysql-community-server

不幸收获报错:

MySQL 8.0 Community Server

GPG key at file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022 (0x3A79BD29) is already installed

The GPG keys listed for the "MySQL 8.0 Community Server" repository are already installed but they are not correct for this package.

Check that the correct key URLs are configured for this repository.. Failing package is: mysql-community-client-8.0.46-1.el9.x86_64

GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022

Public key for mysql-community-client-plugins-8.0.46-1.el9.x86_64.rpm is not installed. Failing package is: mysql-community-client-plugins-8.0.46-1.el9.x86_64

GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022

Public key for mysql-community-common-8.0.46-1.el9.x86_64.rpm is not installed. Failing package is: mysql-community-common-8.0.46-1.el9.x86_64

GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022

Public key for mysql-community-icu-data-files-8.0.46-1.el9.x86_64.rpm is not installed. Failing package is: mysql-community-icu-data-files-8.0.46-1.el9.x86_64

GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022

Public key for mysql-community-libs-8.0.46-1.el9.x86_64.rpm is not installed. Failing package is: mysql-community-libs-8.0.46-1.el9.x86_64

GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022

Public key for mysql-community-server-8.0.46-1.el9.x86_64.rpm is not installed. Failing package is: mysql-community-server-8.0.46-1.el9.x86_64

GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022

The downloaded packages were saved in cache until the next successful transaction.

You can remove cached packages by executing 'dnf clean packages'.

Error: GPG check FAILED

之前安装都没错啊,怎么现在中奖了?

有人讲dnf install -y mysql-community-server --nogpgcheck 关闭校验就行了。然而这不是解决问题之道,绕开了坑,坑还在,迟早还得掉进行。

仔细看提示,都说了2022年的过期了,换2023年即可:

1. 导入 MySQL 最新的 GPG 密钥(2023版,解决校验失败)

rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2023

2. 清理缓存

dnf clean all

3. 重新安装 MySQL

dnf install -y mysql-community-server

相关推荐
倔强的石头_1 天前
《Kingbase护城河》——数据库存储空间全景探测与精细化瘦身实战
数据库
云技纵横1 天前
唯一索引 INSERT 死锁实战:5 秒复现交叉插入的 S 锁循环等待
sql·mysql
沉默王二1 天前
面试官:RAG 不用向量数据库,用 MySQL 硬扛?我:100 万向量不是很轻松?
mysql·面试·ai编程
冬奇Lab2 天前
每日一个开源项目(第134篇):Zvec - 阿里开源的嵌入式向量数据库,向量搜索界的 SQLite
数据库·人工智能·llm
小猿姐2 天前
MySQL Top 10 热点问题 AI 运维实战:从内核诊断到云原生运维
mysql·云原生·aiops
ClouGence2 天前
Oracle CDC 架构优化:从主库直连到 DataGuard 备库同步
数据库·后端·oracle
云技纵横2 天前
Gap Lock 死锁实战:5 秒在本地复现 MySQL 间隙锁死锁
后端·mysql
无响应de神2 天前
三、用户与权限管理
数据库·mysql
摇滚侠3 天前
Linux CentOS7 rpm 安装 MySQL 5.7
linux·运维·mysql