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

How to deeply understand React's ref attribute

Table of contents Overview 1. Creation of Refs ob...

Jenkins builds Docker images and pushes them to Harbor warehouse

Table of contents Dockerfile pom.xml Jenkins Conf...

CSS3 custom scroll bar style::webkit-scrollbar sample code detailed explanation

The default scroll bar style in Windows is ugly, ...

Common commands for deploying influxdb and mongo using docker

Deploy database based on docker sudo docker pull ...

WeChat applet realizes chat room function

This article shares the specific code of WeChat a...

How to replace all tags in html text

(?i) means do not match case. Replace all uppercas...

A complete guide to clearing floats in CSS (summary)

1. Parent div defines pseudo-classes: after and z...

isPrototypeOf Function in JavaScript

Table of contents 1. isPrototypeOf() Example 1, O...

Summary of the understanding of virtual DOM in Vue

It is essentially a common js object used to desc...

CSS achieves highly adaptive full screen

When writing my own demo, I want to use display:f...

Detailed explanation of Tomcat configuration and optimization solutions

Service.xml The Server.xml configuration file is ...

How to check if the firewall is turned off in Linux

1. Service method Check the firewall status: [roo...

CSS multi-column layout solution

1. Fixed width + adaptive Expected effect: fixed ...

Solution to forgetting MySQL root password in MACOS

MySQL is a relational database management system ...