【1】mysql版本升级(5.6升级到5.7)
时间:2019-08-06
本文章向大家介绍【1】mysql版本升级(5.6升级到5.7),主要包括【1】mysql版本升级(5.6升级到5.7)使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。
--停止mysql
/etc/init.d/mysqld stop
--解除5.6链接
[root@mysql02 local]# unlink mysql
[root@mysql02 local]# ll
总用量 951200
drwxr-xr-x. 2 root root 4096 9月 23 2011 bin
drwxr-xr-x. 2 root root 4096 9月 23 2011 etc
drwxr-xr-x. 2 root root 4096 9月 23 2011 games
drwxr-xr-x. 2 root root 4096 9月 23 2011 include
drwxr-xr-x. 2 root root 4096 9月 23 2011 lib
drwxr-xr-x. 2 root root 4096 9月 23 2011 lib64
drwxr-xr-x. 2 root root 4096 9月 23 2011 libexec
drwxr-xr-x. 12 root mysql 4096 7月 14 18:14 mysql-5.6.44-linux-glibc2.12-x86_64
-rw-r--r--. 1 root root 329105487 6月 9 21:55 mysql-5.6.44-linux-glibc2.12-x86_64.tar.gz
-rw-r--r--. 1 root root 644869837 5月 19 22:59 mysql-5.7.26-linux-glibc2.12-x86_64.tar.gz
drwxr-xr-x. 2 root root 4096 9月 23 2011 sbin
drwxr-xr-x. 5 root root 4096 7月 9 06:03 share
drwxr-xr-x. 2 root root 4096 9月 23 2011 src
--创建5.7的链接
[root@mysql02 local]# ln -s mysql-5.7.26-linux-glibc2.12-x86_64 mysql
[root@mysql02 local]# ll
总用量 951204
drwxr-xr-x. 2 root root 4096 9月 23 2011 bin
drwxr-xr-x. 2 root root 4096 9月 23 2011 etc
drwxr-xr-x. 2 root root 4096 9月 23 2011 games
drwxr-xr-x. 2 root root 4096 9月 23 2011 include
drwxr-xr-x. 2 root root 4096 9月 23 2011 lib
drwxr-xr-x. 2 root root 4096 9月 23 2011 lib64
drwxr-xr-x. 2 root root 4096 9月 23 2011 libexec
lrwxrwxrwx. 1 root root 35 7月 17 21:46 mysql -> mysql-5.7.26-linux-glibc2.12-x86_64
drwxr-xr-x. 12 root mysql 4096 7月 14 18:14 mysql-5.6.44-linux-glibc2.12-x86_64
-rw-r--r--. 1 root root 329105487 6月 9 21:55 mysql-5.6.44-linux-glibc2.12-x86_64.tar.gz
drwxr-xr-x. 9 root root 4096 7月 17 21:46 mysql-5.7.26-linux-glibc2.12-x86_64
-rw-r--r--. 1 root root 644869837 5月 19 22:59 mysql-5.7.26-linux-glibc2.12-x86_64.tar.gz
drwxr-xr-x. 2 root root 4096 9月 23 2011 sbin
drwxr-xr-x. 5 root root 4096 7月 9 06:03 share
drwxr-xr-x. 2 root root 4096 9月 23 2011 src
--升级
[root@mysql02 bin]# mysql_upgrade -u root -p
Enter password:
Checking if update is needed.
Checking server version.
Running queries to upgrade MySQL server.
Checking system database.
mysql.columns_priv OK
mysql.db OK
mysql.engine_cost OK
mysql.event OK
mysql.func OK
mysql.general_log OK
mysql.gtid_executed OK
mysql.help_category OK
--登陆
[root@mysql02 bin]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.26-log 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.
--在生产环境当中只需要升级系统表即可
mysql_upgrade -u root -p -s --force
原文地址:https://www.cnblogs.com/gered/p/11309861.html
- MySQL 教程
- MySQL 安装
- MySQL 管理与配置
- MySQL PHP 语法
- MySQL 连接
- MySQL 创建数据库
- MySQL 删除数据库
- MySQL 选择数据库
- MySQL 数据类型
- MySQL 创建数据表
- MySQL 删除数据表
- MySQL 插入数据
- MySQL 查询数据
- MySQL where 子句
- MySQL UPDATE 查询
- MySQL DELETE 语句
- MySQL LIKE 子句
- mysql order by
- Mysql Join的使用
- MySQL NULL 值处理
- MySQL 正则表达式
- MySQL 事务
- MySQL ALTER命令
- MySQL 索引
- MySQL 临时表
- MySQL 复制表
- 查看MySQL 元数据
- MySQL 序列 AUTO_INCREMENT
- MySQL 处理重复数据
- MySQL 及 SQL 注入
- MySQL 导出数据
- MySQL 导入数据
- MYSQL 函数大全
- MySQL Group By 实例讲解
- MySQL Max()函数实例讲解
- mysql count函数实例
- MYSQL UNION和UNION ALL实例
- MySQL IN 用法
- MySQL between and 实例讲解