mysql 5.7升级8.0
升级前准备:
[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的更多相关文章
- mysql 5.5 升级到 mysql 5.6
目前MySQL数据库软件升级到5..26版本,主要有两种方法.一种是停机升级,即在现有环境下先停止数据库,然后升级数据库软件版本和数据库版本:另外一种是采用不停机的主从升级(master--slave ...
- 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 二, ...
- MySQL源码升级
mysql源码升级 升级的方法一般有两类: 1.利用mysqldump来直接导出sql文件,导入到新库中,这种方法是最省事儿的,也是最保险的,缺点的话,也显而易见,大库的mysqldump费时费力. ...
- 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 ...
- Mysql自动备份工具1.0(2013年11月15日更新)
Mysql自动备份工具1.0 下载地址 2013-11-15 1.解决日历控件在Windows7/8/8.1环境下遮挡按钮问题:2.解决按月备份当月没有该日期问题: 2013-11-13 1.Mysq ...
- 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.安装 ...
- mysql 将null转代为0
mysql 将null转代为0 分类: Mysql2012-12-15 11:56 6447人阅读 评论(1) 收藏 举报 1.如果为空返回0 select ifnull(null,0) 2.如果为空 ...
- xcode7.3 升级 xcode8.0 后权限设置问题(升级xcode 8.0 后构建版本不显示问题)
xcode7.3 升级 xcode8.0 后权限设置问题(升级xcode 8.0 后构建版本不显示问题) 前两天为了适配 iOS10 的系统 我将xcode 7.3 升级到了 xcode 8.0 但是 ...
- MySQL 5.6 和 MariaDB-10.0 的性能比较测试
MySQL 5.6 和 MariaDB-10.0 的性能比较测试 时间 2013-02-14 10:11:34 开源中国 原文 http://www.oschina.net/question/12 ...
随机推荐
- Win7 安装 Docker 踩的那些坑
公司电脑是 WIN7 x64 旗舰版 SP1,安装 Docker 时踩了好多雷,分享出来给大家排排雷. 首先,Docker Desktop Installer 的 Windows 版只支持 Win10 ...
- python-网络安全编程第十天(web目录扫描&&fake_useragent模块&&optionParser模块)
前言 昨天的内容没有完成今天花了点时间继续完成了 感觉自己的学习效率太低了!想办法提高学习效率吧 嗯 ,再制定下今天的目标 开始健身. python fake_useragent模块 1.UserAg ...
- (i春秋 Misc)ReCreators - CryMisc
[i春秋 Misc] [题目链接] i春秋 Misc ReCreators CryMisc ReCreators 下载得到一个文件.老规矩,放入010文本编辑器中查看: 文件头是: KDMV 不清楚. ...
- 04.vue获取微博授权URL
1.在Vue页面加载时动态发送请求获取微博授 权url 1.1 在 components\common\lab_header.vue 中写oauth动态获取微 博授权**URL // 获取微博登录地址 ...
- linux(cemtos7.x)安装docker
卸载旧版本 yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest ...
- E - Knapsack 2 题解(超大01背包)
题目链接 题目大意 给你一n(n<=100)个物品,物品价值最大为1e3,物品体积最多为1e9,背包最大为1e9 题目思路 如果按照平常的背包来算那么时间复杂度直接O(1e11) 这个你观察就发 ...
- Eclipse改字体大小
Windows ->Perferences ->General ->Appearance ->Colors and Fonts ->Basic ->Text Fon ...
- C构造类型 数组
一.数组是什么 一组有个固定大小.相同数据类型的数据的集合. 数组可以分为:一维数组.二维数组.三维数组....(维数不止一维:多维数组) 表格 : 行和列(二维数组) 二.一维数组 1.一般形式 类 ...
- Arcgis基于高程(DEM)计算地形湿度指数(TWI),以及坡度(Slope)度单位转换为弧度
以30m*30m分辨率的图层为例 一.基于表面工具箱Surface计算Slope 1.如下图输入图层DEM,输出Slope 2.单位转换: Scale_slope=Slope*pi/180 二.基于水 ...
- linux下定时任务的简单示例
1.方式一:用sleep实现定时任务: 1.1 编辑shell脚本,如下sleep_aa.sh: #!/bin/bash t1=`date "+%Y-%m-%d %H:%M:%S" ...