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:
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
sudo yum update