MySQL8.0.21升级8.0.31
一、停止
systemctl stop mysqld.service
二、下载8.0.31版本rpm包
cd /tmp
wget https://cdn.mysql.com/archives/mysql-8.0/mysql-community-common-8.0.31-1.el8.x86_64.rpm
wget https://cdn.mysql.com/archives/mysql-8.0/mysql-community-libs-8.0.31-1.el8.x86_64.rpm
wget https://cdn.mysql.com/archives/mysql-8.0/mysql-community-client-8.0.31-1.el8.x86_64.rpm
wget https://cdn.mysql.com/archives/mysql-8.0/mysql-community-server-8.0.31-1.el8.x86_64.rpm
三、强制安装指定版本
rpm -ivh mysql-community-common-8.0.31-1.el8.x86_64.rpm --nodeps --force
rpm -ivh mysql-community-libs-8.0.31-1.el8.x86_64.rpm --nodeps --force
rpm -ivh mysql-community-client-8.0.31-1.el8.x86_64.rpm --nodeps --force
rpm -ivh mysql-community-server-8.0.31-1.el8.x86_64.rpm --nodeps --force
四、卸载原版本
rpm -qa |grep mysql
rpm -e mysql-community-server-8.0.21-1.el8.x86_64
rpm -e mysql-community-client-8.0.21-1.el8.x86_64
rpm -e mysql-community-libs-8.0.21-1.el8.x86_64
rpm -e mysql-community-common-8.0.21-1.el8.x86_64
五、重启
systemctl start mysqld.service