centos7上升级mysql8.0.21到mysql8.0.35版本

2024-01-09 17:02:19

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、测试远程连接

文章来源:https://blog.csdn.net/xutengfei999/article/details/135482229
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。