Detailed tutorial for upgrading MySQL 5.7.17 free installation version on Windows (x86, 64bit)

Detailed tutorial for upgrading MySQL 5.7.17 free installation version on Windows (x86, 64bit)

MySQL needs to be upgraded to version 5.5.3 or above to support the default utf8mb64 character encoding of Laravel 5.4. So I upgraded MySQL, and encountered some minor problems during the process, which I recorded for reference.

Upgrade Preparation

  1. Back up the data directory (database directory) under the MySql directory before.
  2. Download the MySQL 5.7.17 version compressed package from the MySql official website.
  3. Run the command line as an administrator and enter the net stop mysql command to stop the MySQL service.
  4. Enter the sc delete mysql command to delete the MySQL service.
  5. Uninstall the current version of MySQL.

Start Upgrading

Unzip the MySQL 5.7.17 compressed package to the corresponding directory (for example: E:\Software\mysql-5.7.17-winx64).

Configuration

Copy my-default.ini to the bin directory and name it my.ini (copying it directly to the root directory may sometimes result in initialization errors).

Add the following to the my.ini file:

[mysqld]
basedir = E:\Software\mysql-5.7.17-winx64
datadir = E:\Software\mysql-5.7.17-winx64\data
port = 3306
default-character-set = utf8
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 
[WinMySQLadmin]
Server = E:\Software\mysql-5.7.17-winx64\bin\mysqld.exe
user = root
password =
[client]
default-character-set = utf8

Note: sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES should be placed above [WinMySQLadmin] and client, otherwise an error will be reported. And the above paths must be changed to the decompression directory.

Installation Services

  1. As an administrator, enter the bin directory and enter the mysqld --initialize command to initialize MySQL.
  2. Enter the mysqld --install command to install the MySQL service.
  3. Enter the net start msyql command to start the MSQL service.
  4. Enter the mysql -h localhost -u root -p command to log in to MySQL.

At this time, you are asked to enter a password. A temporary password is created when MySQL 5.7.17 is initialized. After opening the err file named after the administrator in the data directory, check the first Note to find the temporary password.

2017-02-12T07:22:42.516404Z 1 [Note] A temporary password is generated for root@localhost: RqfpPhxhJ0%a
  1. After entering MySQL, enter alter user 'root'@'localhost' identified by 'new password'; to set the password.
  2. Enter flush privileges; refresh.
  3. Enter quit; to exit, and then you can use the new password to log in to MySQL.

Importing Data

Open the previously backed up data directory and copy the database directories to the data directory of the new version of MySQL. Then you can use the previous databases.

Note: Due to version issues, the data may be incompatible and cannot be used. You need to check the official documentation for a solution.

The above is a detailed tutorial for upgrading MySQL 5.7.17 free installation version on Windows (x86, 64bit) introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

You may also be interested in:
  • MySQL 5.7.30 Installation and Upgrade Issues Detailed Tutorial
  • Upgrade Docker version of MySQL 5.7 to MySQL 8.0.13, data migration
  • phpstudy2018 Tutorial on Upgrading MySQL 5.5 to 5.7 (with pictures and text)
  • Pitfalls and solutions for upgrading MySQL 5.7.23 in CentOS 7
  • Some pitfalls that developers must pay attention to after upgrading to MySQL 5.7
  • Best Practices for MySQL Upgrades
  • How to upgrade MySQL version to 5.7.17 in phpStudy
  • How to upgrade MySQL 5.6 to 5.7 under Windows
  • Some "pitfalls" of MySQL database upgrade

<<:  Native js realizes the drag and drop of the nine-square grid

>>:  Detailed explanation of nginx optimization in high concurrency scenarios

Recommend

Three ways to align div horizontal layout on both sides

This article mainly introduces three methods of i...

HTML form tag tutorial (3): input tag

HTML form tag tutorial, this section mainly expla...

How to add sudo permissions to a user in Linux environment

sudo configuration file The default configuration...

How to deploy Angular project using Docker

There are two ways to deploy Angular projects wit...

How to build a complete samba server in Linux (centos version)

Preface smb is the name of a protocol that can be...

Common Linux English Error Chinese Translation (Newbies Must Know)

1.command not found command not found 2. No such ...

Detailed tutorial on installing nvidia driver + CUDA + cuDNN in Ubuntu 16.04

Preparation 1. Check whether the GPU supports CUD...

Founder font library Chinese and English file name comparison table

Founder Type Library is a font library developed ...

JavaScript Document Object Model DOM

Table of contents 1. JavaScript can change all HT...

This article will show you how to use Vue 3.0 responsive

Table of contents Use Cases Reactive API related ...

How to implement Nginx reverse proxy for multiple servers

Nginx reverse proxy multiple servers, which means...

Docker uses dockerfile to start node.js application

Writing a Dockerfile Taking the directory automat...

About ROS2 installation and docker environment usage

Table of contents Why use Docker? Docker installa...

JavaScript setTimeout and setTimeinterval use cases explained

Both methods can be used to execute a piece of ja...

A complete list of commonly used HTML tags and their characteristics

First of all, you need to know some characteristi...