Methods for upgrading to 5.7 under Windows mysql5.6

Source: Internet
Author: User

There are two ways to upgrade MySQL: In-place upgrade and logical upgrade . There is no difference in the nature of these two ways of upgrading.

There is only a difference in the processing of data files. In-place upgrade is to directly copy the data files, and the logical upgrade to the data file processing method is through the logical export import mysqldump , need to use.
Logical upgrade It is understood that this approach takes a long time when the volume of data is relatively large. So today we're going to talk about in- situ upgrades .

Upgrade in situ1. Close the existing MySQL. Using the cmd window, 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 compression pack.

: https://dev.mysql.com/downloads/mysql/
The latest mysql5.7 compression package unpacking you will find that there is no data directory and My.ini files, not the same as the previous version.

3. Copy the Data directory and My.ini file from the previous mysql5.6 to mysql5.7.

这个地方要注意:my.ini中,版本5.6的配置,有一些在版本5.7下面已经不能用了。
Make the following modifications to the Mysql.ini file configuration.

[mysqld]# 设置mysql的安装目录[根据本地情况进行修改]basedir = X:/Ares/bin/mysql# 设置mysql数据库的数据的存放目录[根据本地情况进行修改]datadir = X:/Ares/bin/mysql/data#设置3306端口port = 3306# 允许最大连接数max_connections=200# 服务端使用的字符集默认为8比特编码的latin1字符集character-set-server=utf8# 创建新表时将使用的默认存储引擎default-storage-engine=INNODBsql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES[mysql]# 设置mysql客户端默认字符集default-character-set=utf8
4. Add the mysql5.7 service to the win service queue and start the MySQL service.

Add the mysql5.7 service to the win service queue

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

Start the MySQL service

X:\Ares\bin\mysql5.7\bin>net start mysql5.7mysql5.7 服务正在启动 ..mysql5.7 服务已经启动成功。
5. Upgrade Mysql:mysql_upgrade-uroot-p
X:\Ares\bin\mysql5.7\bin>mysql_upgrade -uroot -p123.......省略一万字..........

The upgrade speed depends on the size of the data directory.

6. Once the upgrade is successful, restart the mysql5.7 service again
X:\Ares\bin\mysql5.7\bin>net stop mysql5.7mysql 服务正在停止.mysql 服务已成功停止。
X:\Ares\bin\mysql5.7\bin>net start mysql5.7mysql5.7 服务正在启动 ..mysql5.7 服务已经启动成功。
7. The installation upgrade is complete.

Original link: http://blog.csdn.net/u010010725/article/details/70170231

Methods for upgrading to 5.7 under Windows mysql5.6

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.