问题描述
Linux安装Mysql5.7时出现如下报错
The GPG keys listed for the "MySQL 5.7 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-libs-5.7.37-1.el7.x86_64
GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

问题原因
这是由于MySQL GPG 密钥已过期导致的 问题解决出处 https://bugs.mysql.com/bug.php?id=106188
解决办法
需要如下运行命令, 以2022年为例
rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
然后重新执行
yum -y install mysql-community-server -y

