当前位置: 首页 > news >正文

mysql二进制方式升级8.0.34

一、概述

mysql8.0.33 存在如下高危漏洞,需要通过升级版本修复漏洞

Oracle MySQL Cluster 安全漏洞(CVE-2023-0361) mysql/8.0.33  Apache Skywalking <=8.3 SQL注入漏洞

 

二、查看mysql版本及安装包信息

[root@localhost mysql]# mysql -V
mysql  Ver 8.0.33 for Linux on x86_64 (MySQL Community Server - GPL)
[root@localhost mysql]# 
[root@localhost mysql]# rpm -qa|grep mysql
[root@localhost mysql]# ps -ef|grep mysql
mysql     290614       1  0 7月11 ?       00:00:00 /bin/sh /opt/mysql/mysql_base/bin/mysqld_safe --defaults-file=/etc/my.cnf
mysql     291491  290614  2 7月11 ?       14:48:00 /opt/mysql/mysql_base/bin/mysqld --defaults-file=/etc/my.cnf --basedir=/opt/mysql/mysql_base --datadir=/opt/mysql/data --plugin-dir=/opt/mysql/mysql_base/lib/plugin --log-error=err.log --open-files-limit=65535 --pid-file=localhost.localdomain.pid --socket=/opt/mysql/data/mysql.sock --port=3306
root     3002932 2950183  0 11:09 pts/0    00:00:00 grep --color=auto mysql
[root@localhost mysql]# 

三、下载升级包

复制如下浏览器

https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.34-linux-glibc2.12-x86_64.tar.xz

下载这个安装包

mysql-8.0.34-linux-glibc2.12-x86_64.tar.xz

四、升级mysql版本

##mysqldump备份数据库
省略##关闭数据库
[mysql@localhost mysql]$ mysqladmin -uroot -p'密码' shutdown
mysqladmin: [Warning] Using a password on the command line interface can be insecure.
[mysql@localhost mysql]$ ps -ef|grep mysql
root     3003230 2950183  0 11:12 pts/0    00:00:00 su - mysql
mysql    3003231 3003230  0 11:12 pts/0    00:00:00 -bash
mysql    3003305 3003231  0 11:13 pts/0    00:00:00 ps -ef
mysql    3003306 3003231  0 11:13 pts/0    00:00:00 grep --color=auto mysql
[mysql@localhost mysql]$ ##解压安装包
[root@localhost mysql]# xz -d mysql-8.0.34-linux-glibc2.12-x86_64.tar.xz
[root@localhost mysql]# tar -xf mysql-8.0.34-linux-glibc2.12-x86_64.tar 
[root@localhost mysql]# chown -R mysql.mysql mysql-8.0.34-linux-glibc2.12-x86_64
[root@localhost mysql]# su - mysql##替换前
[mysql@localhost mysql]$ ls -lrt mysql_base
lrwxrwxrwx 1 mysql mysql 35 5月  10 19:54 mysql_base -> mysql-8.0.33-linux-glibc2.12-x86_64
[mysql@localhost mysql]$ ##删除软链接
[mysql@localhost mysql]$ rm -rf mysql_base##使用新版本创建软链接
[mysql@localhost mysql]$ ln -sf mysql-8.0.34-linux-glibc2.12-x86_64 mysql_base
[mysql@localhost mysql]$ ls -lrt mysql_base
lrwxrwxrwx 1 mysql mysql 35 8月   6 11:20 mysql_base -> mysql-8.0.34-linux-glibc2.12-x86_64
[mysql@localhost mysql]$ ##启动数据库
[mysql@localhost mysql]$ /opt/mysql/mysql_base/bin/mysqld_safe --datadir=/opt/mysql/data &##查看进程
[mysql@localhost mysql]$ ps -ef|grep mysql
root     3004011 2950183  0 11:20 pts/0    00:00:00 su - mysql
mysql    3004012 3004011  0 11:20 pts/0    00:00:00 -bash
mysql    3004164 3004012  0 11:21 pts/0    00:00:00 /bin/sh /opt/mysql/mysql_base/bin/mysqld_safe --datadir=/opt/mysql/data
mysql    3005043 3004164 48 11:21 pts/0    00:00:15 /opt/mysql/mysql_base/bin/mysqld --basedir=/opt/mysql/mysql_base --datadir=/opt/mysql/data --plugin-dir=/opt/mysql/mysql_base/lib/plugin --log-error=err.log --open-files-limit=65535 --pid-file=localhost.localdomain.pid --socket=/opt/mysql/data/mysql.sock --port=3306
mysql    3005366 3004012  0 11:22 pts/0    00:00:00 ps -ef
mysql    3005367 3004012  0 11:22 pts/0    00:00:00 grep --color=auto mysql
[mysql@localhost mysql]$ ##查看数据库版本
[mysql@localhost mysql]$ mysql -V
mysql  Ver 8.0.34 for Linux on x86_64 (MySQL Community Server - GPL)
[mysql@localhost mysql]$ 
http://www.lryc.cn/news/111303.html

相关文章:

  • Kotlin单例代码实例
  • (7.28-8.3)【大数据新闻速递】《数字孪生工业软件白皮书》、《中国绿色算力发展研究报告》发布;华为ChatGPT要来了
  • TikTok海外抖音云控抢金币宝箱
  • H3C交换机如何通过MAC和IP查寻对应ARP信息
  • python进阶
  • spring boot 配置文件和属性注入
  • springboot+vue私人健身和教练预约管理系统 nt5mp
  • Kotlin基础(十一):反射和注解
  • DALLE2论文解读及实现(一)
  • RabbitMQ-API
  • 外边距实现居中的写法
  • 剑指 Offer 20. 表示数值的字符串 (正则 逐步分解)
  • 【深度学习】Transformer,Self-Attention,Multi-Head Attention
  • CADintosh X for mac CAD绘图软件2D CAD 程序 兼容 M1
  • 【读书笔记】《厌女》- [日]上野千鹤子 - 2010年出版
  • Android 从其他xml文件中获取View组件数据
  • java 数组的使用
  • Jmeter(一) - 从入门到精通 - 环境搭建(详解教程)
  • 外贸企业选择CRM的三大特点
  • 软件测试与游戏测试的区别
  • Programming Abstractions in C阅读笔记:p72-p75
  • bash测试test详解
  • 你来问我来答,ChatGPT对话软件测试!主题互动
  • 无人机巢的作用及应用领域解析
  • 面试热题(环形链表II)
  • 策略模式:优雅地实现可扩展的设计
  • 从8个新 NFT AMM,聊聊能如何为 NFT 提供流动性
  • 习题1.27
  • 简单游戏截图_可控截取内容2
  • 跨域+四种解决方法