MySQL5.7.03 Replacement of higher version to MySQL 5.7.17 Installation process and solutions to problems found

MySQL5.7.03 Replacement of higher version to MySQL 5.7.17 Installation process and solutions to problems found

1. How to install?

1. [Run] -> [cmd] to open the small black window. Locate the bin directory of the MySQL installation directory [my D:\Program Files\mysql-5.7.9-winx64] and enter [mysqld -install]. As shown below, the installation is successful

2. Open the MySQL installation directory, find [my-default.ini], and configure some simple information.

# These are commonly set, remove the # and set as required. 
basedir = D:\Program Files\mysql-5.7.9-winx64 
datadir = D:\Program Files\mysql-5.7.9-winx64\data 
port = 3306 
# server_id = .....

3. Enter [mysqld --initialize] to initialize MySQL. The initialization process may take a while. When the following interface appears and there is content in the data folder in the MySQL installation directory, it means that the initialization is successful.

Because the new version of MySQL needs to initialize a table when it starts. Therefore, please do not skip this step.

4. Enter [mysqld -install] to install the MySQL service.

5. Start mysql [net start mysql]

6. Log in [mysql -uroot -p]

The installation-free version of msyql-5.7.17-winx64.zip will generate a data directory during initialization in step 3. The default root account initial password is in the .err file in the mysql-5.7.17\data directory.

7. After successful login, change the root account password to 'root'

#
 Change the password of the root account ALTER
 USER 'root'@'localhost'
 IDENTIFIED BY 'root';

2. How to restore the low version of sql database:

1 Cut ibdata1 in the data directory to somewhere else

2 Copy the users (here we take a users library as an example) folder and ibdata1 file in the data directory of the previous lower version to the data directory of the higher version of MySQL.

At this point, the copied users library can be used, but the database in the higher version cannot be used (because the ibdata1 file is of a lower version)

3 Restart mysql and save the users database as a .sql file

4 Replace the low version ibdata1 file with the high version ibdata1 (now, the high version library can be used, the low version library cannot be used, ibdata1 is the high version)

5 Restart msyql, create a library (users, the library name can be changed), open the .sql file generated in step 3 in MySQL Workbench and execute

Summarize

The above is the installation process of replacing MySQL5.7.03 with a higher version of MySQL 5.7.17 and the solution to the problems found. I hope it will be helpful to everyone. If you have any questions, please leave me a message and I 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:
  • Detailed tutorial on customizing the installation path of MySQL 5.7.18 version (binary package installation)
  • MySQL 5.7.18 version free installation configuration tutorial
  • mysql5.7.18.zip Installation-free version configuration tutorial (windows)
  • Installation tutorial of the latest stable version of MySQL 5.7.17 under Linux
  • Detailed explanation of how to compile and install PHP7.0.10+MySQL5.7.14+Nginx1.10.1 under CentOS 7.2 (mini version)

<<:  Steps to transfer files and folders between two Linux servers

>>:  Nodejs error handling process record

Recommend

In-depth understanding of JavaScript callback functions

Table of contents Preface Quick Review: JavaScrip...

Detailed explanation of Linux text processing command sort

sort Sort the contents of a text file Usage: sort...

Several commonly used single-page application website sharing

CSS3Please Take a look at this website yourself, ...

Detailed explanation of Linux text editor Vim

Vim is a powerful full-screen text editor and the...

MySQL 5.7 deployment and remote access configuration under Linux

Preface: Recently I am going to team up with my p...

Definition and function of zoom:1 attribute in CSS

Today I was asked what the zoom attribute in CSS ...

Vue3 list interface data display details

Table of contents 1. List interface display examp...

An IE crash bug

Copy code The code is as follows: <style type=...

How to clear floating example code in css

Overview The framework diagram of this article is...

Html easily implements rounded rectangle

Question: How to achieve a rounded rectangle usin...

How to manage large file uploads and breakpoint resume based on js

Table of contents Preface Front-end structure Bac...

JS Easy to understand Function and Constructor

Table of contents 1. Overview 1.1 Creating a func...