In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
How to upgrade mysql5.6 to mysql5.7, I believe that many inexperienced people are at a loss about this. Therefore, this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
1. Stop the mysql5.6 database service
[root@host2 mysql] # / etc/init.d/mysqld stopShutting down MySQL.. [OK] [root@host2 mysql] #
2. Enter / usr/local to replace the soft connection and assign it to mysql5.7
[root@host2 local] # lsbin games lib libexec mysql mysql-5.7.16-linux-glibc2.5-x86_64 mysql-utilities-1.6.5.tar.gz shareetc 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
Create a new link
[root@host2 local] # ln-s mysql-5.7.16-linux-glibc2.5-x86_64 mysql [root@host2 local] # lltotal 712drwxr-xr-x. 2 root root 4096 Jun 28 2011 bindrwxr-xr-x. 2 root root 4096 Jun 28 2011 etcdrwxr-xr-x. 2 root root 4096 Jun 28 2011 gamesdrwxr-xr-x. 2 root root 4096 Jun 28 2011 includedrwxr-xr-x. 2 root root 4096 Jun 28 2011 libdrwxr-xr-x. 2 root root 4096 Jun 28 2011 lib64drwxr-xr-x. 2 root root 4096 Jun 28 2011 libexec-rw-r--r--. 1 root root 2754 Nov 6 15:44 my.cnflrwxrwxrwx. 1 root root 34 Mar 8 15:34 mysql- > mysql-5.7.16-linux-glibc2.5-x86_64drwxr-xr-x. 12 mysql mysql 4096 Feb 27 18:33 mysql-5.6.34-linux-glibc2.5-x86_64drwxr-xr-x. 11 root mysql 4096 Nov 19 00:01 mysql-5.7.16-linux-glibc2.5-x86_64drwxr-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.gzdrwxr-xr-x. 2 root root 4096 Jun 28 2011 sbindrwxr-xr-x. 5 root root 4096 Nov 6 22:15 sharedrwxr-xr-x. 2 root root 4096 Jun 28 2011 src
3. Start the database and enter the database
[root@host2 local] # / etc/init.d/mysqld startStarting MySQL. [OK]. [root@host2 local] # mysql-u root-pEnter password: Welcome to the MySQL monitor. Commands end with; or\ g.Your MySQL connection id is 2Server version: 5.7.16-log MySQL Community Server (GPL)
(you can see that the database has reached version 5.7)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.mysql >
4. Update the data structure (the table is not rebuilt by adding the-s parameter when the production environment uses mysql_upgrade update)
[root@host2 local] # mysql_upgrade-p123-smysql_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.
The upgrade has been successful so far
5. Enter the database to view
Mysql > show databases +-+ | Database | +-+ | information_schema | | mysql | | performance_schema | | sys | | test | +-+ can see that the sys library already exists However, the directly installed 5.7library does not have a test library. Here, both sys and test exist. After reading the above, have you mastered how to upgrade mysql5.6 to mysql5.7? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.