从mysql8.0.15升级到8.0.16

环境简介

操作系统:Centos 6.10 64位

目前版本:8.0.15 MySQL Community Server 二进制

目的:升级为8.0.16

安装目录:/data/mysql/mysql_3306

一、升级步骤

1、下载软件;

2、一致性停库;

3、备份数据;

4、修改软连接;

5、启动数据库;

6、升级数据库;

7、验证。

1. 下载软件

由于是glibc-2.12-1.212.el6.x86_64,所以下载对应的mysql版本。

[root@db144 mysql_3306]# rpm -qa| grep glib
glibc-common-2.12-1.212.el6.x86_64
glibc-2.12-1.212.el6.x86_64
dbus-glib-0.86-.el6.x86_64
glibc-headers-2.12-1.212.el6.x86_64
glib2-2.28.-.el6.x86_64
glibc-devel-2.12-1.212.el6.x86_64
[root@db144 mysql_3306]#

[root@db144 ~]# mysql.3306.login
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.15 MySQL Community Server - GPL


Copyright (c) 2000, 2019, 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> show databases;
+--------------------+
| Database |
+--------------------+
| db144 |
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
5 rows in set (0.36 sec)


mysql> exit

 

[root@db144 mysql_3306]# cd /opt/
[root@db144 opt]# ll
total
drwxr-xr-x. root root Apr : mysql-8.0.-linux-glibc2.-x86_64
-rw-r--r--. root root Apr : mysql-8.0.-linux-glibc2.-x86_64.tar.xz
[root@db144 opt]# wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.16-linux-glibc2.12-x86_64.tar.xz
# 解压安装包
[root@db144 opt]# tar -xJf mysql-8.0.16-linux-glibc2.12-x86_64.tar.xz # 停库

[root@db144 opt]# cd /usr/local/
[root@db144 local]# ll
total 40
drwxr-xr-x. 2 root root 4096 Sep 23 2011 bin
drwxr-xr-x. 2 root root 4096 Sep 23 2011 etc
drwxr-xr-x. 2 root root 4096 Sep 23 2011 games
drwxr-xr-x. 2 root root 4096 Sep 23 2011 include
drwxr-xr-x. 2 root root 4096 Sep 23 2011 lib
drwxr-xr-x. 2 root root 4096 Sep 23 2011 lib64
drwxr-xr-x. 2 root root 4096 Sep 23 2011 libexec
lrwxrwxrwx. 1 root root 40 Apr 10 00:15 mysql -> /opt/mysql-8.0.15-linux-glibc2.12-x86_64
drwxr-xr-x. 2 root root 4096 Sep 23 2011 sbin
drwxr-xr-x. 5 root root 4096 Mar 12 22:38 share
drwxr-xr-x. 2 root root 4096 Sep 23 2011 src
[root@db144 local]# mysql.3306.stop
[1] 9775
[root@db144 local]# mysqladmin: [Warning] Using a password on the command line interface can be insecure.

[1]+ Done /usr/local/mysql/bin/mysqladmin -h127.0.0.1 -P 3306 -uroot -p'AnvcTMagdLarwNV3CKaC' shutdown
[root@db144 local]#

[root@db144 local]# unlink mysql

# 备份数据目录

[root@db144 local]# cp -r /data/mysql/mysql_3306 /data/mysql/mysql_3306.bak

# 做软连接

[root@db144 local]# ln -s /opt/mysql-8.0.16-linux-glibc2.12-x86_64 /usr/local/mysql
[root@db144 local]# ll
total 40
drwxr-xr-x. 2 root root 4096 Sep 23 2011 bin
drwxr-xr-x. 2 root root 4096 Sep 23 2011 etc
drwxr-xr-x. 2 root root 4096 Sep 23 2011 games
drwxr-xr-x. 2 root root 4096 Sep 23 2011 include
drwxr-xr-x. 2 root root 4096 Sep 23 2011 lib
drwxr-xr-x. 2 root root 4096 Sep 23 2011 lib64
drwxr-xr-x. 2 root root 4096 Sep 23 2011 libexec
lrwxrwxrwx. 1 root root 40 May 5 18:21 mysql -> /opt/mysql-8.0.16-linux-glibc2.12-x86_64
drwxr-xr-x. 2 root root 4096 Sep 23 2011 sbin
drwxr-xr-x. 5 root root 4096 Mar 12 22:38 share
drwxr-xr-x. 2 root root 4096 Sep 23 2011 src
[root@db144 local]# chown -R mysql.mysql mysql
[root@db144 local]#

# 启动数据库

[root@db144 local]# mysql.3306.start
[1] 9801
[root@db144 local]# 2019-05-05T10:22:01.454070Z mysqld_safe Logging to '/data/mysql/mysql_3306/logs/error.log'.
2019-05-05T10:22:01.630984Z mysqld_safe Starting mysqld daemon with databases from /data/mysql/mysql_3306/data

# my.cnf中去掉这个参数  #internal_tmp_disk_storage_engine = InnoDB

[root@db144 local]# mysql_upgrade -s -uroot -p -h 127.0.0.1 -P 3306
Enter password:
The mysql_upgrade client is now deprecated. The actions executed by the upgrade client are now done by the server.
To upgrade, please start the new MySQL binary with the older data directory. Repairing user tables is done automatically. Restart is not required after upgrade.
The upgrade process automatically starts on running a new MySQL binary with an older data directory. To avoid accidental upgrades, please use the --upgrade=NONE option with the MySQL binary. The option --upgrade=FORCE is also provided to run the server upgrade sequence on demand.
It may be possible that the server upgrade fails due to a number of reasons. In that case, the upgrade sequence will run again during the next MySQL server start. If the server upgrade fails repeatedly, the server can be started with the --upgrade=MINIMAL option to start the server without executing the upgrade sequence, thus allowing users to manually rectify the problem.
[root@db144 local]#

# 经查证,现在已经不使用这个了,服务在启动时,自动帮你升级完毕了。

[root@db144 local]# mysql.3306.login
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.16 MySQL Community Server - GPL

Copyright (c) 2000, 2019, 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> \s;
--------------
/usr/local/mysql/bin/mysql Ver 8.0.16 for linux-glibc2.12 on x86_64 (MySQL Community Server - GPL)

Connection id: 9
Current database:
Current user: root@127.0.0.1
SSL: Cipher in use is DHE-RSA-AES128-GCM-SHA256
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 8.0.16 MySQL Community Server - GPL
Protocol version: 10
Connection: 127.0.0.1 via TCP/IP
Server characterset: utf8mb4
Db characterset: utf8mb4
Client characterset: utf8mb4
Conn. characterset: utf8mb4
TCP port: 3306
Uptime: 9 min 9 sec

Threads: 2 Questions: 8 Slow queries: 0 Opens: 1133 Flush tables: 3 Open tables: 16 Queries per second avg: 0.014
--------------

ERROR:
No query specified

mysql> exit
Bye
[root@db144 local]#

附录 :

社区版的8.0.15的安装方法:https://www.cnblogs.com/bjx2020/p/10682518.html

从mysql8.0.15升级到8.0.16的更多相关文章

  1. Nuget包CommonServiceLocator从1.0.3升级到2.0.4时MvvmLight的ViewModelLocator初始化SimpleIoc.Default格式不匹配问题

    原文:Nuget包CommonServiceLocator从1.0.3升级到2.0.4时MvvmLight的ViewModelLocator初始化SimpleIoc.Default格式不匹配问题 把旧 ...

  2. 安装zabbix3.0以及升级到5.0过程

    关闭防火墙: systemctl stop firewalld.service systemctl disable firewalld.service 需要关闭 selinux,一定要关闭这个,开启s ...

  3. 【Oracle】RAC 10.2.0.1升级10.2.0.5

    环境: OS:OEL5.6 RAC:10.2.0.1.0 相关环境变量: CRS_HOME /u01/app/oracle/product/10.2.0/db_1 ORACLE_HOME   /u01 ...

  4. WangSql 3.0源码共享(WangSql 1.0重大升级到3.0)

    WangSql 1.0博文阅读: http://www.cnblogs.com/deeround/p/6204610.html 基于1.0做了以下重大改动: 1.多数据实现方式调整 2.使用EmitM ...

  5. MVC3.0 项目升级到 MVC4.0

    按照 http://www.asp.net/whitepapers/mvc4-release-notes#_Toc303253806 的步骤 第一步:修改web.config 注意,默认的MVC3网站 ...

  6. Windows平台下面Oracle11.2.0.1 升级Oracle11.2.0.4 的简单步骤

    1. 首先查看数据库的版本: 2. ESXi 上面的虚拟机挂在 oracle11.2.0.4的 iso磁盘 3. 执行set 进行升级 4. 安装选项进行选择 升级现有的数据库 5. 注意安装位置必须 ...

  7. Windows 版本下 Oracle12.1.0.2 升级Oracle12.2.0.1的步骤

    oracle12.1.0.1 2013年发布的产品 2014年左右发布12.1.0.2 2016年底发布了 oracle12.2.0.1 经常有人会安装了最早的oracle版本,然后需要升级到最新的o ...

  8. [python]pip 版本9.0.1升级到10.0.1故障解决办法

    问题背景: 在做android自动化时使用到第三方库uiautomator时,提示要安装,但安装该uiautomator库时提示当前的pip版本偏低,需要安装10.0.1版本方可.但在升级到升级到该版 ...

  9. Oracle11.2.0.1 升级Oracle11.2.0.4 后 listener 的端口改变需要处理

    1. 因为Oracle采取了异地升级 发现 Oracle的端口号发生了变化: 2. 如果之前的连接还需要用的话 需要禁用 dbhome1 里面的监听 只打开dbhome2的监听 并且修改 监听的端口号 ...

随机推荐

  1. JForum论坛安装以及部署(转)

    链接地址:https://www.cnblogs.com/Amos-Turing/p/7151009.html 下载JForum2.1.9 包手动放到tomcat的webapps下面, 这次打开网址: ...

  2. RTX系统整合记录

    1.切换数据库RTX常见问题解答五. SQL数据库配置 2.同步系统组织机构 部门同步 用户同步https://blog.csdn.net/qq_21703215/article/details/80 ...

  3. spring ehcache 缓存框架

    一.简介 Ehcache是一个用Java实现的使用简单,高速,实现线程安全的缓存管理类库,ehcache提供了用内存,磁盘文件存储,以及分布式存储方式等多种灵活的cache管理方案.同时ehcache ...

  4. Elastic search中使用nested类型的内嵌对象

    在大数据的应用环境中,往往使用反范式设计来提高读写性能. 假设我们有个类似简书的系统,系统里有文章,用户也可以对文章进行赞赏.在关系型数据库中,如果按照数据库范式设计,需要两张表:一张文章表和一张赞赏 ...

  5. c++ 指针(二)

    指针 (4)指针数组 #include <iostream> using namespace std; ; int main () { , , }; ; i < MAX; i++) ...

  6. 【HANA系列】SAP HANA使用XS和HTTP创建proxy

    公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[HANA系列]SAP HANA使用XS和HTT ...

  7. 【机器学习入门笔记】第 2 课:SVM

    Support Vector machines 为什么人们称一种算法为机器,我也不知道(俄罗斯人发明) 粗略的来说,支持向量机所做的就是去寻找分割线(separating) 或者通常称之为超平面,介于 ...

  8. python 迭代器(第二次总结)

    迭代器 1.先明白迭代器是什么意思 迭代:不断的取值的(器)工具 迭代器:就是一个重复的过程,每一次重复都是基于上一次的结果而来的. (单纯的重复不是迭代) 2.为什么要有迭代器 不依赖索引取值的方法 ...

  9. CMD 显示当前时间和日期

    1. 其实还是应该多看 help  要知道 help 比百度还用一百倍 除了 可能东西比较多 C:\Users\Administrator>date /? 显示或设置日期. DATE [/T | ...

  10. mysql常用的基本命令

    一.基本命令 1.启动服务(以管理员身份进入cmd): 格式:net start 服务名称 示例:net start mysql 2.停止服务(以管理员身份进入cmd): 格式:net stop 服务 ...