升级步骤:
1、停止MySQL服务
service mysqld stop
2、备份配置文件
mv /etc/my.cnf /etc/my.cnf.bak
3、卸载现有旧版本MySQL
rpm -qa | grep -i mysql | xargs rpm -ev --nodeps
4、安装新版本
rpm -ivh mysql-community-common-5.7.36-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.36-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.7.36-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-5.7.36-1.el7.x86_64.rpm
5、恢复配置文件
rm -rf /etc/my.cnf
cp /etc/my.cnf.bak /etc/my.cnf
chmod 644 /etc/my.cnf//需要注意权限问题
6、启动MySQL服务
service mysqld start
7、测试数据库
参考链接:https://blog.csdn.net/dongyuan234/article/details/101288890