This article provides a guide for resolving an issue caused by MySQL GPG key expiration. This error can arise during server updates or database updates on MySQL databases due to an expired GnuPG key stored in the configuration files.
Background and MySQL GnuPG Keys
The GnuPG build key used to sign MySQL downloadable packages has been updated. The previous GnuPG build key expired on 2022-02-16. GnuPG keys provide an added layer of security by verifying the integrity and authenticity of MySQL downloadable packages using GnuPG signature checking.
Issues Caused by Expired MySQL Server GPG Keys
Due to the GnuPG key update, systems configured to use repo.mysql.com may report a signature verification error when upgrading to MySQL 5.7.37 and higher or to MySQL 8.0.28 and higher using apt or yum.
How to Fix MySQL Server GPG Keys Expired
Use one of the following methods to resolve this issue:
- Manually reinstall the MySQL APT or YUM repository setup package from https://dev.mysql.com/downloads/.
- Download the MySQL GnuPG public key and add it your system GPG keyring.
The current GnuPG public key can be downloaded from: https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
As root user, you can SSH your server and run the following commands:
rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
After replacing the key, automated update processes should respond normally.