下载安装包
下面地址查找Red Hat Enterprise Linux/ Oracle LinuX的版本安装包
下载时需要登录oracle账号
https://dev.mysql.com/downloads/mysql/
压缩包名 mysql-8.0.37-1.el9.x86_64.rpm-bundle.tar
用tar -xvf解压 用
tar -xvf mysql-8.0.37-1.el9.x86_64.rpm-bundle.tar
开始安装
命令如下
dnf install -y libtirpc net-tools perl
rpm -ivh mysql-community-common-8.0.37-1.el9.x86_64.rpm
rpm -ivh mysql-community-client-plugins-8.0.37-1.el9.x86_64.rpm
rpm -ivh mysql-community-libs-8.0.37-1.el9.x86_64.rpm
rpm -ivh mysql-community-client-8.0.37-1.el9.x86_64.rpm
rpm -ivh mysql-community-icu-data-files-8.0.37-1.el9.x86_64.rpm
rpm -ivh mysql-community-server-8.0.37-1.el9.x86_64.rpm
启动/开机自启
systemctl start mysqld
systemctl enable mysqld
#删除安装源
rm -rf mysql-community*
rm -rf mysql-8.0.37-1.el9.x86_64.rpm-bundle.tar