Databases 16 min read

Upgrading MySQL from 5.6 to 5.7 on Windows Using ZIP and In‑Place Method

This guide explains how to upgrade MySQL 5.6 instances to 5.7 on Windows by using the ZIP distribution and an in‑place upgrade, covering preparation, installation, required Visual C++ libraries, common pitfalls, troubleshooting steps, and a complete checklist of post‑upgrade actions.

Aikesheng Open Source Community
Aikesheng Open Source Community
Aikesheng Open Source Community
Upgrading MySQL from 5.6 to 5.7 on Windows Using ZIP and In‑Place Method

Background : The author shares experience supporting MySQL instance upgrades on Windows, focusing on the common scenario of moving from version 5.6 to 5.7.

Limitations : MySQL Installer cannot be used for major‑version upgrades or for upgrading between community and enterprise editions; the ZIP (no‑install) package is recommended. Two upgrade approaches exist – in‑place (suitable for large databases) and logical (for small or cross‑major upgrades).

Environment preparation : Download the Windows ZIP packages for 5.6.x (e.g., 5.6.30) and 5.7.x (e.g., 5.7.30) community editions, extract them on a Windows 10 host, and prepare a minimal my.ini configuration.

Installing the 5.6 environment : Unzip the package, uncomment a few essential parameters in the default configuration, and start the instance. For production, additional parameters would be tuned.

Upgrading 5.6 → 5.7 : The guide uses the in‑place method and highlights key points:

After installing 5.7 via ZIP, start the instance with skip‑grant‑tables to reset the root password and remove empty accounts.

Service creation and removal must be executed from an elevated command prompt (e.g., mysqld install mysql5630 / mysqld remove mysql5630 ).

If the instance is started with mysqld --console , logs appear in the console and the process ends when the window closes.

Copy the data directory and my.ini from the 5.6 installation to the 5.7 directory (stop the instance first).

Ensure the 5.7 datadir matches the original location and adjust paths if the ZIP is extracted to a different directory.

Verify default parameters with mysqld --print-defaults and avoid using outdated my.cnf files.

Install the required Visual C++ redistributables (e.g., MSVCR120.dll, MSVCP120.dll) if the service creation reports missing DLLs.

Reference links for missing DLLs :

https://www.groovypost.com/howto/fix-visual-c-plus-plus-redistributable-windows-10/
https://answers.microsoft.com/en-us/windows/forum/windows_7-performance/missing-msvcp120dll-file/f0a14d55-73f0-4a21-879e-1cbacf05e906

Upgrade troubleshooting case : The service stopped immediately after creation. Investigation showed that the wrong mysqld binary (5.6) was being used and the my.ini still pointed to the old paths. After correcting the binary path, updating the configuration, and restarting, the service ran normally.

Login test : Demonstrates how three root accounts (from ::1, 127.0.0.1, and localhost) are selected by default, how adding -uroot prefers the ::1 account, and how removing accounts changes the connection source. It also shows that on Windows all these hosts use TCP/IP, even when using -S .

mysql> select user,host from mysql.user;
+---------------+-------------+
| user          | host        |
+---------------+-------------+
| root          | 10.186.64.% |
| root          | 127.0.0.1   |
| root          | ::1         |
| mysql.session | localhost   |
| mysql.sys     | localhost   |
| root          | localhost   |
+---------------+-------------+
C:\Users\Administrator> mysql -uroot -p
Enter password: ********
Welcome to the MySQL monitor. ...
mysql> select current_user(),user();
+----------------+----------------+
| current_user() | user()         |
+----------------+----------------+
| root@::1       | root@localhost |
+----------------+----------------+

Upgrade steps summary :

Download the 5.7.30 ZIP package and extract to a new directory.

Install Visual C++ 2012/2013 (or newer) runtimes.

Stop the 5.6 instance, record GTID/binlog position, and remove its Windows service.

Back up the 5.6 datadir (including binlogs).

Copy the 5.6 datadir and my.ini to the 5.7 basedir , adjust paths and enable new 5.7 features (e.g., semi‑sync, MTS).

Update the system PATH to point to basedir\bin of 5.7.

Start the 5.7 instance, create and start its Windows service.

Verify server and client versions.

Run mysql_upgrade to upgrade system tables.

Restart the instance.

Re‑check configuration (especially sql_mode ) for compatibility.

Optionally clean up the old 5.6 directories.

If replication is used, adjust slave_net_timeout and related parameters as the default changed after 5.7.7.

Conclusion : The article provides a practical, step‑by‑step procedure for performing a clean MySQL 5.6‑to‑5.7 upgrade on Windows, covering upgrade limitations, required tools, common errors, and verification steps to ensure a smooth transition.

databaseMySQLtroubleshootingIn-PlaceWindowsupgradezip
Aikesheng Open Source Community
Written by

Aikesheng Open Source Community

The Aikesheng Open Source Community provides stable, enterprise‑grade MySQL open‑source tools and services, releases a premium open‑source component each year (1024), and continuously operates and maintains them.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.