Skip to content

Instantly share code, notes, and snippets.

@caffeinetiger
Created April 5, 2022 14:43
Show Gist options
  • Save caffeinetiger/ac047a6fdbb2cd5a9dd93a0801585c98 to your computer and use it in GitHub Desktop.
Save caffeinetiger/ac047a6fdbb2cd5a9dd93a0801585c98 to your computer and use it in GitHub Desktop.

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

This is relevant to Amazon Linux 2018.03

From the references basically:

1. Download the valid GPG Key:

wget https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
mv ./RPM-GPG-KEY-mysql-2022 /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022

2. Edit relevant MySQL repo files in /etc/yum.repos.d replacing the existing key with the new key like:

[mysql-connectors-community]
name=MySQL Connectors Community
baseurl=http://repo.mysql.com/yum/mysql-connectors-community/el/6/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2022

In my case the files to edit were:

/etc/yum.repos.d/mysql-community.repo
/etc/yum.repos.d/mysql-community-source.repo 

3. Perform a yum update when done

sudo yum update

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment