详细参考这篇文章
https://cloud.tencent.com/developer/article/2096856
如果这一步报错
yum -y install mysql-community-server
Public key for mysql-community-libs-5.7.44-1.el7.x86_64.rpm is not installed
Failing package is: mysql-community-libs-5.7.44-1.el7.x86_64
GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
解决办法参考这一篇文章
https://blog.csdn.net/charon869/article/details/132189305
使用第一种方法即可
yum -y install mysql-community-server --nogpgcheck