mysql 5.1升级5.6_【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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值