在线精品99_中国九九盗摄偷拍偷看_91免费版在线观看_91.app_91高清视频在线_99热最新网站

mysql5.6怎么升级到mysql5.7

103次阅读
没有评论

共计 2838 个字符,预计需要花费 8 分钟才能阅读完成。

mysql5.6 怎么升级到 mysql5.7,相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。

1、停止 mysql5.6 数据库服务

[root@host2 mysql]# /etc/init.d/mysqld stop
Shutting down MySQL.. [ OK ]
[root@host2 mysql]#

2、进入 /usr/local 更换软连接指定到 mysql5.7

[root@host2 local]# ls
bin games lib libexec mysql mysql-5.7.16-linux-glibc2.5-x86_64 mysql-utilities-1.6.5.tar.gz share
etc include lib64 my.cnf mysql-5.6.34-linux-glibc2.5-x86_64 mysql-utilities-1.6.5 sbin src
[root@host2 local]# unlink mysql

创建新的链接

[root@host2 local]# ln -s mysql-5.7.16-linux-glibc2.5-x86_64 mysql
[root@host2 local]# ll
total 712
drwxr-xr-x. 2 root root 4096 Jun 28 2011 bin
drwxr-xr-x. 2 root root 4096 Jun 28 2011 etc
drwxr-xr-x. 2 root root 4096 Jun 28 2011 games
drwxr-xr-x. 2 root root 4096 Jun 28 2011 include
drwxr-xr-x. 2 root root 4096 Jun 28 2011 lib
drwxr-xr-x. 2 root root 4096 Jun 28 2011 lib64
drwxr-xr-x. 2 root root 4096 Jun 28 2011 libexec
-rw-r--r--. 1 root root 2754 Nov 6 15:44 my.cnf
lrwxrwxrwx. 1 root root 34 Mar 8 15:34 mysql -  mysql-5.7.16-linux-glibc2.5-x86_64
drwxr-xr-x. 12 mysql mysql 4096 Feb 27 18:33 mysql-5.6.34-linux-glibc2.5-x86_64
drwxr-xr-x. 11 root mysql 4096 Nov 19 00:01 mysql-5.7.16-linux-glibc2.5-x86_64
drwxr-xr-x. 7 7161 31415 4096 Feb 28 02:00 mysql-utilities-1.6.5
-rw-r--r--. 1 root root 668241 Feb 28 01:59 mysql-utilities-1.6.5.tar.gz
drwxr-xr-x. 2 root root 4096 Jun 28 2011 sbin
drwxr-xr-x. 5 root root 4096 Nov 6 22:15 share
drwxr-xr-x. 2 root root 4096 Jun 28 2011 src

3、启动数据库并进入数据库

[root@host2 local]# /etc/init.d/mysqld start
Starting MySQL.............................................[ OK ]..............................
[root@host2 local]# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.16-log MySQL Community Server (GPL)

(可以看到数据库已经到 5.7 版本了)

Copyright (c) 2000, 2016, 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

4、更新数据结构(生产环境使用 mysql_upgrade 更新的时候加 - s 参数   不重建表)

[root@host2 local]# mysql_upgrade -p123 -s
mysql_upgrade: [Warning] Using a password on the command line interface can be insecure.
The --upgrade-system-tables option was used, databases won t be touched.
Checking if update is needed.
Checking server version.
Running queries to upgrade MySQL server.
Upgrading the sys schema.
Upgrade process completed successfully.
Checking if update is needed.

至此升级成功
5、进入数据库查看

mysql  show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
| test |
+--------------------+
可以看到 sys 库已经存在,但是直接安装的 5.7 的库是没有 test 库的,这里 sys 和 test 同时存在说明是从 5.6 升级到 5.7

看完上述内容,你们掌握 mysql5.6 怎么升级到 mysql5.7 的方法了吗?如果还想学到更多技能或想了解更多相关内容,欢迎关注丸趣 TV 行业资讯频道,感谢各位的阅读!

正文完
 
丸趣
版权声明:本站原创文章,由 丸趣 2023-07-19发表,共计2838字。
转载说明:除特殊说明外本站除技术相关以外文章皆由网络搜集发布,转载请注明出处。
评论(没有评论)
主站蜘蛛池模板: 思思99re6国产在线播放 | 欧美成人www在线观看网页 | 日韩久久无码免费毛片软件 | 亚洲精品国产第一综合99久久 | 欧美一级特黄真人毛片 | 四虎影院在线免费观看 | 亚洲qingse中文久久网 | 国产a视频精品免费观看 | 亚洲国产人成在线观看69网站 | 狠狠亚洲丁香综合久久 | 偷拍小视频99在线 | 精品视频久久久 | 精品亚洲成在人线av无码 | 日韩一级在线观看 | 久久久久久久尹人综合网亚洲 | 成年人视频免费看 | 亚洲三区在线观看无套内射 | 99国产精品久久久久久久久久久 | 日本一级黄色 | 天天狠狠色综合图片区 | 最近中文字幕最新在线视频 | 国产成人一区二区三区 | 九九久久国产精品免费热6 九九久久精品 | 一个人看的www日本视频 | 国产成人一区二区在线不卡 | 午夜激情福利视频 | 99精品视频在线观看re | 日韩天天操 | 涩涩97| 91嫩草私人成人亚洲影院 | 无码人妻精品丰满熟妇区 | 午夜在线观看免费高清在线播放 | 中文字幕亚洲一区二区三区 | 美女脱了内裤张开腿让男人添软件 | 插吧插吧综合网 | 亚洲自偷自拍熟女另类 | 国产成人综合久久 | 一区在线观看 | aaaaaaa一级毛片 | 亚洲精品永久www嫩草 | 18成人免费观看软件大全 |