暂无图片
暂无图片
暂无图片
暂无图片
暂无图片
MySQL5.7.31小版本升级5.7.41(rpm方式).pdf
385
4页
3次
2023-05-12
10墨值下载
环境 配置
操作系统 CentOS 7.5
MySQL版本 MySQL 5.7.31
目标MySQL版本 MySQL 5.7.41
MySQL 5.7.31小版本升级至5.7.41rpm方式)
背景:扫描出漏洞,需要升级补丁
1、备份数据和参数文件
2、设置innodb_fast_shutdown参数
3、关闭MySQL服务
4、上传rpm包并解压
#备份数据库
mysqldump -u root -p --all-databases > alldatabases20230512.sql
#备份配置文件
cp /etc/my.cnf /etc/my.cnf.bak20230512
1
2
3
4
5
#优雅的关闭
mysql -u root -p -e"SET GLOBAL innodb_fast_shutdown=0"
1
2
###关闭MySQL服务
mysqladmin -u root -p shutdown
###查看状态
service mysqld status
1
2
3
4
5、升级
mv mysql-5.7.41-1.el7.x86_64.rpm-bundle.tar mysql5.7.41/
cd mysql5.7.41/
tar -xvf mysql-5.7.41-1.el7.x86_64.rpm-bundle.tar
1
2
3
4
5
yum install mysql-community-{server,client,common,libs}-*
-----部分信息-----
Dependencies Resolved
=====================================================================================
===========================================================
Package                Arch       Version       
Repository                         Size
=====================================================================================
===========================================================
Updating:
mysql-community-client        x86_64      5.7.41-1.el7     
/mysql-community-client-5.7.41-1.el7.x86_64        108 M
mysql-community-common        x86_64      5.7.41-1.el7     
/mysql-community-common-5.7.41-1.el7.x86_64        2.8 M
mysql-community-libs         x86_64      5.7.41-1.el7     
/mysql-community-libs-5.7.41-1.el7.x86_64          10 M
mysql-community-libs-compat      x86_64      5.7.41-1.el7     
/mysql-community-libs-compat-5.7.41-1.el7.x86_64      5.9 M
mysql-community-server        x86_64      5.7.41-1.el7     
/mysql-community-server-5.7.41-1.el7.x86_64        774 M
Transaction Summary
=====================================================================================
===========================================================
Upgrade 5 Packages
Total size: 901 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating  : mysql-community-common-5.7.41-1.el7.x86_64              
                          1/10
Updating  : mysql-community-libs-5.7.41-1.el7.x86_64               
                          2/10
Updating  : mysql-community-client-5.7.41-1.el7.x86_64              
                          3/10
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
6、启动数据库
Updating  : mysql-community-server-5.7.41-1.el7.x86_64              
                          4/10
Updating  : mysql-community-libs-compat-5.7.41-1.el7.x86_64           
                           5/10
Cleanup  : mysql-community-server-5.7.31-1.el7.x86_64              
                          6/10
Cleanup  : mysql-community-client-5.7.31-1.el7.x86_64              
                          7/10
Cleanup  : mysql-community-libs-compat-5.7.31-1.el7.x86_64           
                           8/10
Cleanup  : mysql-community-libs-5.7.31-1.el7.x86_64               
                          9/10
Cleanup  : mysql-community-common-5.7.31-1.el7.x86_64              
                          10/10
Verifying : mysql-community-libs-compat-5.7.41-1.el7.x86_64           
                           1/10
Verifying : mysql-community-client-5.7.41-1.el7.x86_64              
                          2/10
Verifying : mysql-community-server-5.7.41-1.el7.x86_64              
                          3/10
Verifying : mysql-community-common-5.7.41-1.el7.x86_64              
                          4/10
Verifying : mysql-community-libs-5.7.41-1.el7.x86_64               
                          5/10
Verifying : mysql-community-libs-compat-5.7.31-1.el7.x86_64           
                           6/10
Verifying : mysql-community-common-5.7.31-1.el7.x86_64              
                          7/10
Verifying : mysql-community-server-5.7.31-1.el7.x86_64              
                          8/10
Verifying : mysql-community-client-5.7.31-1.el7.x86_64              
                          9/10
Verifying : mysql-community-libs-5.7.31-1.el7.x86_64               
                          10/10
Updated:
mysql-community-client.x86_64 0:5.7.41-1.el7    mysql-community-common.x86_64
0:5.7.41-1.el7 mysql-community-libs.x86_64 0:5.7.41-1.el7
mysql-community-libs-compat.x86_64 0:5.7.41-1.el7 mysql-community-server.x86_64
0:5.7.41-1.el7
Complete!
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
service mysqld start
service mysqld status
service mysqld status
Redirecting to /bin/systemctl status mysqld.service
1
2
3
4
5
of 4
10墨值下载
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文档的来源(墨天轮),文档链接,文档作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。