进入官网:http://www.mysql.com
选择社区版本得到MySQL
选择对应的版本和系统进行安装
用wget进行软件包下载
wget https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.32-1.el9.x86_64.rpm-bundle.tar
解压该软件包
tar -xf mysql-8.0.32-1.el9.x86_64.rpm-bundle.tar
安装MySQL软件包以及它所有的依赖包
yum localinstall mysql-community-server-8.0.32-1.el9.x86_64.rpm \
> mysql-community-client-8.0.32-1.el9.x86_64.rpm \
> mysql-community-common-8.0.32-1.el9.x86_64.rpm \
> mysql-community-client-plugins-8.0.32-1.el9.x86_64.rpm \
> mysql-community-icu-data-files-8.0.32-1.el9.x86_64.rpm \
> mysql-community-libs-8.0.32-1.el9.x86_64.rpm -y
启动mysql服务
systemctl restart mysqld
如有其他疑问后续步骤可参考此处