How to upgrade Mysql5.6 to 5.7 Under Win, mysql5.65.7

Source: Internet
Author: User

How to upgrade Mysql5.6 to 5.7 Under Win, mysql5.65.7

Preface

MySQL can be upgraded in two ways: in-situ upgrade and logical upgrade. There is no essential difference between the two upgrade methods. There are some differences in the processing of data files. In-situ upgrade directly copies data files, while the logical upgrade processes data files through logical export and uses mysqldump.

Everyone understands that this method takes a long time when the data volume is large. So today we will talk about in-situ upgrades.

In-situ upgrade

1. Disable existing mysql. Use the cmd window to go To the mysql directory and remove the mysql service.

X:\Ares\bin\mysql5.6\bin>mysqld --remove mysql5.6Service successfully removed.

2. download the latest mysql5.7 package.

: Https://dev.mysql.com/downloads/mysql/

Decompress the latest mysql5.7 package and you will find that there is no data directory and my. ini file, which is different from the previous version.

3. copy the data directory and my. ini file of mysql5.6 to mysql5.7.

Note: In my. ini, some configurations of version 5.6 are no longer available under version 5.7.

Modify the configuration of the mysql. ini file as follows.

[Mysqld] # Set the mysql installation directory [modify according to local conditions] basedir = X: /Ares/bin/mysql # Set the data storage directory of the mysql database [modify according to local conditions] datadir = X: /Ares/bin/mysql/data # set port 3306 = 3306 # maximum number of connections max_connections = 200 # the character set used by the server is an 8-bit latin1 character set character-set-server by default. = utf8 # default storage engine default-storage-engine = INNODBsql_mode = NO_ENGINE_SUBSTITUTION, STRICT_TRANS_TABLES [mysql] # set the default character set of the mysql client default-character-set = utf8

4. Add the mysql5.7 service to the win service queue and start the mysql service.

Add the service of mysql5.7 to the service queue of win

X:\Ares\bin\mysql5.7\bin>mysqld --install mysql5.7Service successfully removed.

Start mysql Service

X: \ Ares \ bin \ mysql5.7 \ bin> net start mysql5.7mysql5.7 service is starting... mysql5.7 service has been started successfully.

5. Upgrade mysql: mysql_upgrade-uroot-p

X: \ Ares \ bin \ mysql5.7 \ bin> mysql_upgrade-uroot-p123. ...... omit the 10 thousand words ..........

The upgrade speed depends on the data directory size.

6. After the upgrade is successful, restart the mysql5.7 service again.

X: \ Ares \ bin \ mysql5.7 \ bin> net stop mysql5.7mysql service is stopping. mysql service has been stopped successfully. X: \ Ares \ bin \ mysql5.7 \ bin> net start mysql5.7mysql5.7 service is starting... mysql5.7 service has been started successfully.

7. The installation and upgrade are complete.

The above section describes how to upgrade MySQL 5.7 to MySQL in windows. I hope it will be helpful to you. If you have any questions, please leave a message and I will reply to you in a timely manner. Thank you very much for your support for the help House website!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.