MySQL Server GPG Keys Expired (Workaround)


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.

  • mysql, gpg key, gnupg
  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

View Server PHP Environment with phpinfo.php

The phpinfo() function outputs a huge amount of information about the system you're using, such...

How to Change Root Password Using SSH

This article explains the method of changing the root password on a Linux Server using SSH....

How to Create Sudo User on CentOS

This article provides step-by-step setup guide for adding Sudo user to CentOS system. The sudo...

How to Use Sudo

This article provides a guide to using a Sudo user on CentOS server. From the command line,...

Set Server Time Zones with Timedatectl

This article provides a guide to setting the server time and server time zone settings using...