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

Analysis of the principles of Mysql dirty page flush and shrinking table space

mysql dirty pages Due to the WAL mechanism, when ...

8 essential JavaScript code snippets for your project

Table of contents 1. Get the file extension 2. Co...

How to build Apr module for tomcat performance optimization

Preface Tomcat is a widely used Java web containe...

A brief discussion on the CSS overflow mechanism

Why do you need to learn CSS overflow mechanism i...

Analysis of Alibaba Cloud CentOS7 server nginx configuration and FAQs

Preface: This article refers to jackyzm's blo...

CentOS7.5 installation tutorial of MySQL

1. First check whether the system has mysql insta...

JS+CSS to realize dynamic clock

This article example shares the specific code of ...

Example of using the href attribute and onclick event of a tag

The a tag is mainly used to implement page jump, ...

Using the outline-offset property in CSS to implement a plus sign

Assume there is such an initial code: <!DOCTYP...

MySql 5.6.36 64-bit green version installation graphic tutorial

There are many articles about MySQL installation ...

CSS3 click button circular progress tick effect implementation code

Table of contents 8. CSS3 click button circular p...

Example code for implementing a simple search engine with MySQL

Table of contents Preface Introduction ngram full...

Nodejs plug-in and usage summary

The operating environment of this tutorial: Windo...