MySQLのインストールに失敗した（MySQL GPGキー有効期限切れ）


ローカルに作ってたDockerImageを消してしまって、再度docker-compose buildしたら、mysqlの導入でエラーになった・・



```
 > [ 9/19] RUN yum install -y mysql-community-server:                                                                                                                                                                                                                 
#0 0.367 Loaded plugins: fastestmirror, ovl                                                                                                                                                                                                                           
#0 0.508 Determining fastest mirrors                                                                                                                                                                                                                                  
#0 9.901  * base: ftp.iij.ad.jp                                                                                                                                                                                                                                       
#0 9.904  * epel: epel.excellmedia.net                                                                                                                                                                                                                                
#0 9.908  * extras: ftp.iij.ad.jp
#0 9.911  * remi-safe: ftp.riken.jp
#0 9.913  * updates: ftp.iij.ad.jp
#0 11.73 https://mirror.lzu.edu.cn/epel/7/x86_64/repodata/77af4afeec2934fa532cc201c5c8b01041e5a643d90d6c10976d7f72861aa08b-updateinfo.xml.bz2: [Errno 14] HTTPS Error 404 - Not Found
#0 11.73 Trying other mirror.
#0 11.73 To address this issue please refer to the below wiki article 
#0 11.73 
#0 11.73 https://wiki.centos.org/yum-errors
#0 11.73 
#0 11.73 If above article doesn't help to resolve this issue please use https://bugs.centos.org/.
#0 11.73 
#0 19.91 Resolving Dependencies
#0 19.91 --> Running transaction check
#0 19.91 ---> Package mysql-community-server.x86_64 0:8.0.32-1.el7 will be installed
#0 19.93 --> Processing Dependency: mysql-community-common(x86-64) = 8.0.32-1.el7 for package: mysql-community-server-8.0.32-1.el7.x86_64
#0 20.14 --> Processing Dependency: mysql-community-icu-data-files = 8.0.32-1.el7 for package: mysql-community-server-8.0.32-1.el7.x86_64
#0 20.14 --> Processing Dependency: mysql-community-client(x86-64) >= 8.0.11 for package: mysql-community-server-8.0.32-1.el7.x86_64
#0 20.15 --> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: mysql-community-server-8.0.32-1.el7.x86_64
#0 20.15 --> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: mysql-community-server-8.0.32-1.el7.x86_64
#0 20.15 --> Processing Dependency: libnuma.so.1(libnuma_1.1)(64bit) for package: mysql-community-server-8.0.32-1.el7.x86_64
#0 20.16 --> Processing Dependency: libnuma.so.1(libnuma_1.2)(64bit) for package: mysql-community-server-8.0.32-1.el7.x86_64
#0 20.16 --> Processing Dependency: net-tools for package: mysql-community-server-8.0.32-1.el7.x86_64
#0 20.16 --> Processing Dependency: libaio.so.1()(64bit) for package: mysql-community-server-8.0.32-1.el7.x86_64
#0 20.16 --> Processing Dependency: libnuma.so.1()(64bit) for package: mysql-community-server-8.0.32-1.el7.x86_64
#0 20.16 --> Running transaction check
#0 20.16 ---> Package libaio.x86_64 0:0.3.109-13.el7 will be installed
#0 20.16 ---> Package mysql-community-client.x86_64 0:8.0.32-1.el7 will be installed
#0 20.16 --> Processing Dependency: mysql-community-client-plugins = 8.0.32-1.el7 for package: mysql-community-client-8.0.32-1.el7.x86_64
#0 20.17 --> Processing Dependency: mysql-community-libs(x86-64) >= 8.0.11 for package: mysql-community-client-8.0.32-1.el7.x86_64
#0 20.18 ---> Package mysql-community-common.x86_64 0:8.0.32-1.el7 will be installed
#0 20.18 ---> Package mysql-community-icu-data-files.x86_64 0:8.0.32-1.el7 will be installed
#0 20.18 ---> Package net-tools.x86_64 0:2.0-0.25.20131004git.el7 will be installed
#0 20.18 ---> Package numactl-libs.x86_64 0:2.0.12-5.el7 will be installed
#0 20.19 --> Running transaction check
#0 20.19 ---> Package mysql-community-client-plugins.x86_64 0:8.0.32-1.el7 will be installed
#0 20.19 ---> Package mysql-community-libs.x86_64 0:8.0.32-1.el7 will be installed
#0 20.22 --> Finished Dependency Resolution
#0 20.24 
#0 20.24 Dependencies Resolved
#0 20.24 
#0 20.24 ================================================================================
#0 20.24  Package                        Arch   Version          Repository         Size
#0 20.24 ================================================================================
#0 20.24 Installing:
#0 20.24  mysql-community-server         x86_64 8.0.32-1.el7     mysql80-community  64 M
#0 20.24 Installing for dependencies:
#0 20.24  libaio                         x86_64 0.3.109-13.el7   base               24 k
#0 20.24  mysql-community-client         x86_64 8.0.32-1.el7     mysql80-community  16 M
#0 20.24  mysql-community-client-plugins x86_64 8.0.32-1.el7     mysql80-community 2.5 M
#0 20.24  mysql-community-common         x86_64 8.0.32-1.el7     mysql80-community 654 k
#0 20.24  mysql-community-icu-data-files x86_64 8.0.32-1.el7     mysql80-community 2.1 M
#0 20.24  mysql-community-libs           x86_64 8.0.32-1.el7     mysql80-community 1.5 M
#0 20.24  net-tools                      x86_64 2.0-0.25.20131004git.el7
#0 20.24                                                         base              306 k
#0 20.24  numactl-libs                   x86_64 2.0.12-5.el7     base               30 k
#0 20.24 
#0 20.24 Transaction Summary
#0 20.24 ================================================================================
#0 20.24 Install  1 Package (+8 Dependent packages)
#0 20.24 
#0 20.24 Total download size: 87 M
#0 20.24 Installed size: 411 M
#0 20.24 Downloading packages:
#0 20.53 warning: /var/cache/yum/x86_64/7/mysql80-community/packages/mysql-community-client-plugins-8.0.32-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY
#0 20.53 Public key for mysql-community-client-plugins-8.0.32-1.el7.x86_64.rpm is not installed
#0 22.54 --------------------------------------------------------------------------------
#0 22.54 Total                                               38 MB/s |  87 MB  00:02     
#0 22.55 Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
#0 22.58 Importing GPG key 0x5072E1F5:
#0 22.58  Userid     : "MySQL Release Engineering <mysql-build@oss.oracle.com>"
#0 22.58  Fingerprint: a4a9 4068 76fc bd3c 4567 70c8 8c71 8d3b 5072 e1f5
#0 22.58  Package    : mysql80-community-release-el7-3.noarch (@/mysql80-community-release-el7-3.noarch)
#0 22.58  From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
#0 22.59 
#0 22.59 
#0 22.59 Public key for mysql-community-client-plugins-8.0.32-1.el7.x86_64.rpm is not installed
#0 22.59 
#0 22.59 
#0 22.59  Failing package is: mysql-community-client-plugins-8.0.32-1.el7.x86_64
#0 22.59  GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
#0 22.59 
```


取り急ぎ、新しいキーを導入することで回避できたっぽい！
```
FROM centos:7
〜
〜
RUN rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
RUN yum install -y mysql-community-server
```



参考になりました。ありがとうございます
https://blog.proglus.jp/5095/

https://blog.proglus.jp/5095/