1、下载安装包
cd /home/soft/mysql8.0.35
wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.35-1.el7.x86_64.rpm-bundle.tar
2、解压压缩包
3、停止掉mysqld服务
systemctl stop mysqld
4、强制安装新的版本包
rpm -ivh mysql-community-common-8.0.35-1.el7.x86_64.rpm --nodeps --force
rpm -ivh mysql-community-libs-8.0.35-1.el7.x86_64.rpm --nodeps --force
rpm -ivh mysql-community-client-8.0.35-1.el7.x86_64.rpm --nodeps --force
rpm -ivh mysql-community-server-8.0.35-1.el7.x86_64.rpm --nodeps --force
5、查看已经安装的mysql
rpm -qa | grep mysql
6、移除mysql8.0.21对应的包
rpm -e mysql-community-server-8.0.21-1.el7.x86_64
rpm -e mysql-community-client-8.0.21-1.el7.x86_64
rpm -e mysql-community-libs-8.0.21-1.el7.x86_64
rpm -e mysql-community-common-8.0.21-1.el7.x86_64
7、重新启动mysqld
systemctl start mysqld
8、查看mysql版本
mysql --version
9、测试远程连接