升级前准备:
[root@node01 ~]# mysql -V
mysql Ver 14.14 Distrib 5.7.25, for linux-glibc2.12 (x86_64) using EditLine wrapper # 进入原5.7 mysql命令行 正确关闭数据库
mysql> select version();
+------------+
| version() |
+------------+
| 5.7.25-log |
+------------+
1 row in set (0.00 sec) mysql> show variables like 'innodb_fast_shutdown';
+----------------------+-------+
| Variable_name | Value |
+----------------------+-------+
| innodb_fast_shutdown | 1 |
+----------------------+-------+
1 row in set (0.00 sec)
# 确保数据都刷到硬盘上,更改成0
mysql> set global innodb_fast_shutdown=0;
Query OK, 0 rows affected (0.00 sec) mysql> shutdown;
Query OK, 0 rows affected (0.00 sec) mysql> exit
Bye 升级步骤:
[root@node01 ~]# tar -xvf mysql-8.0.22-linux-glibc2.17-x86_64-minimal.tar.xz
[root@node01 ~]# ln -s /root/mysql-8.0.22-linux-glibc2.17-x86_64-minimal /usr/local/mysql8
[root@node01 ~]# ll /usr/local/mysql8
lrwxrwxrwx. 1 root root 49 Nov 4 00:13 /usr/local/mysql8 -> /root/mysql-8.0.22-linux-glibc2.17-x86_64-minimal
[root@node01 ~]# chown -R mysql.mysql /usr/local/mysql8*
[root@node01 ~]# vi /etc/profile
export MYSQL_HOME=/usr/local/mysql8
export PATH=$PATH:$MYSQL_HOME/bin [root@node01 ~]# mysql -V
mysql Ver 8.0.22 for Linux on x86_64 (MySQL Community Server - GPL) 参数文件:
[mysql]
port=3306
socket=/tmp/mysql.sock [mysqld]
port=3306
socket=/tmp/mysql.sock
user=mysql
server-id=1
basedir=/usr/local/mysql8
datadir=/mysql/3306/data
log-bin=/mysql/3306/binlog/mysql-bin
binlog_format=row
gtid_mode = ON
enforce_gtid_consistency = ON [root@node01 ~]# /usr/local/mysql8/bin/mysqld_safe &
[1] 9328
[root@node01 ~]# 2020-11-03T16:17:42.786011Z mysqld_safe Logging to '/mysql/3306/data/node01.err'.
2020-11-03T16:17:42.824011Z mysqld_safe Starting mysqld daemon with databases from /mysql/3306/data [root@node01 ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 8.0.22 MySQL Community Server - GPL Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> select version();
+-----------+
| version() |
+-----------+
| 8.0.22 |
+-----------+
1 row in set (0.00 sec) mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
| test |
+--------------------+
5 rows in set (0.00 sec) mysql> use test;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A Database changed
mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| test |
+----------------+
1 row in set (0.00 sec) mysql> select * from test;
+------+
| id |
+------+
| 1 |
| 2 |
| 3 |
+------+
3 rows in set (0.00 sec) 配置mysqld服务:
[root@node01 ~]# cp /usr/local/mysql8/support-files/mysql.server /etc/init.d/mysqld8

  

mysql 5.7升级8.0的更多相关文章

  1. mysql 5.5 升级到 mysql 5.6

    目前MySQL数据库软件升级到5..26版本,主要有两种方法.一种是停机升级,即在现有环境下先停止数据库,然后升级数据库软件版本和数据库版本:另外一种是采用不停机的主从升级(master--slave ...

  2. gitlab RPM卸载 & 安装 && 升级(9.0.13-》9.5.9-》10.0->10.3.9->10.6.6-》10.8-》11.0)

    版本:9.0.3 升级版本:9.0.13 一,停止服务 gitlab-ctl stop unicorn gitlab-ctl stop sidekiq gitlab-ctl stop nginx 二, ...

  3. MySQL源码升级

    mysql源码升级 升级的方法一般有两类: 1.利用mysqldump来直接导出sql文件,导入到新库中,这种方法是最省事儿的,也是最保险的,缺点的话,也显而易见,大库的mysqldump费时费力. ...

  4. centos6.8 Mysql-5.7.20 升级 mysql-8.0.14-1

    Mysql-5.7.20 升级 mysql-8.0.14-1   操作前建议先查阅以下网页初步了解Mysql版本升级信息  https://blog.csdn.net/u012946310/artic ...

  5. Mysql自动备份工具1.0(2013年11月15日更新)

    Mysql自动备份工具1.0 下载地址 2013-11-15 1.解决日历控件在Windows7/8/8.1环境下遮挡按钮问题:2.解决按月备份当月没有该日期问题: 2013-11-13 1.Mysq ...

  6. centos 6.5下安装mysql+nginx+redmine 3.1.0 笔记

    centos 6.5下安装mysql+nginx+redmine 3.1.0 笔记 目录[-] 过程 1.安装RVM 2.利用rvm安装 Ruby 1.9.3 并设为默认 3.安装rails 4.安装 ...

  7. mysql 将null转代为0

    mysql 将null转代为0 分类: Mysql2012-12-15 11:56 6447人阅读 评论(1) 收藏 举报 1.如果为空返回0 select ifnull(null,0) 2.如果为空 ...

  8. xcode7.3 升级 xcode8.0 后权限设置问题(升级xcode 8.0 后构建版本不显示问题)

    xcode7.3 升级 xcode8.0 后权限设置问题(升级xcode 8.0 后构建版本不显示问题) 前两天为了适配 iOS10 的系统 我将xcode 7.3 升级到了 xcode 8.0 但是 ...

  9. MySQL 5.6 和 MariaDB-10.0 的性能比较测试

    MySQL 5.6 和 MariaDB-10.0 的性能比较测试 时间 2013-02-14 10:11:34  开源中国 原文  http://www.oschina.net/question/12 ...

随机推荐

  1. 3、Spring Boot日志

    1.日志框架 市面上的日志框架:JUL.JCL.Jboss-logging.logback.log4j.log4j2.slf4j.... 日志门面 (日志的抽象层) 日志实现 JCL(Jakarta ...

  2. List、Tuple、Set、Dictionary数据类型

    一.List数据类型 1.概述:list(列表)中可以包含多个元素,且元素类型可以不相同. 每一元素可以是任意数据类型,包括列表(即列表嵌套)及后面要介绍的元组.集合.字典. 所有元素都写在一对方括号 ...

  3. curl 超时问题解决

    curl -o /dev/null -s -w %{time_namelookup}---%{time_connect}---%{time_starttransfer}---%{time_total} ...

  4. B+树作为数据库索引有什么优势?I/O方面?

    首先要了解磁盘预读机制,大致就是说,从磁盘读取数据的速度比从内存读取数据的速度要慢很多,所以要尽量减少磁盘I/O的操作,尽量增加内存I/O操作,既然这样,我们可以从磁盘提前把需要的数据拿到内存,这样需 ...

  5. 使用FL Studio来制作停顿的效果

    停顿效果是一种在音乐创作中非常常用的音效,它能起到缓冲的作用,而且能使这段旋律更具节奏感,在比较激情的歌曲中尤为常见.例如知名歌手王力宏演唱的<火力全开>中就使用了停顿效果,为歌曲加了不少 ...

  6. RabbitMQ PHP扩展安装

    RabbitMQ PHP扩展安装 # 安装rabbitmq-c依赖包 yum install libtool autoconf # 安装rabbitmq-c ( 最好下载 0.5的,0.6安装可能会报 ...

  7. vulnhub: DC 9

    信息收集: root@kali:/opt/test# nmap -A -v 192.168.76.137 Starting Nmap 7.80 ( https://nmap.org ) at 2020 ...

  8. 【python】Matplotlib作图中有多个Y轴

    在作图过程中,需要绘制多个变量,但是每个变量的数量级不同,在一个坐标轴下作图导致曲线变化很难观察,这时就用到多个坐标轴.本文除了涉及多个坐标轴还包括Axisartist相关作图指令.做图中label为 ...

  9. Linux下的MediaWiki的部署启动遇到的问题与解决方案

    1. MySQL安装不成功 解决方案:https://bbs.csdn.net/topics/394377536 2. no space left on device ubuntu 解决方案:http ...

  10. layer 父弹窗获取子弹窗内的dom节点元素和变量

    1 var body = layer.getChildFrame('body', index); //获取子弹窗的dom节点 2 3 var iframeWin = window[layero.fin ...