Detailed installation and configuration tutorial of MySQL 5.7 under Win10

Detailed installation and configuration tutorial of MySQL 5.7 under Win10

1. Unzip MySQL 5.7

2. Create a new configuration file my.ini and place it in D:\Free\mysql-5.7.26-winx64 directory

[mysql]
# Set the default character set of the mysql client to default-character-set=utf8
[mysqld]
#Set port 3306 port = 3306
# Set the installation directory of mysql basedir=D:\Free\mysql-5.7.26-winx64
# Set the storage directory of mysql database data datadir=D:\Free\mysql-5.7.26-winx64\data
# Maximum number of connections allowed max_connections=200
# The default character set used by the server is the 8-bit latin1 character set character-set-server=utf8
# The default storage engine that will be used when creating a new table default-storage-engine=INNODB
# Ignore password skip-grant-tables

As shown in the figure:

3. Configure MySQL environment variables

MYSQL_HOME=D:\Free\mysql-5.7.26-winx64
Add %MYSQL_HOME%\bin after PATH; 

4. Install MySQL as an administrator

mysqld --install

5. Initialize data files

mysqld --initialize-insecure --user=mysql

No error is OK

6. Start MySQL service

net start mysql

Note: If an error message appears when starting the MySQL service, as shown in the figure below, the error is usually caused by the inconsistency between the service path and the installation path. If you have installed MySQL before and then uninstalled and reinstalled it, this problem is likely to occur

The solution is:

Modify the ImagePath path of MySQL in the Windows registry to the actual installation path of MySQL, as shown in the following figure

After modification, it is as shown in the following figure:

7. Log in to MySQL without password and change the root password

mysql -uroot -p

update mysql.user set authentication_string=password('root') where user='root' and Host = 'localhost'; 

I set the root account password to root and then refresh it.

flush privileges;

8. Remove the skip-grant-tables configuration in the MySQL configuration file to ignore the password

Add a # sign in front to comment it out

9. Restart MySQL and log in again with the new password

Successfully logged in!

Summarize

The above is a detailed installation and configuration tutorial of the free installation version of MySQL 5.7 under Win10 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!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • MySQL 8.0.15 installation and configuration tutorial under Win10
  • mysql8.0.11 winx64 installation and configuration method graphic tutorial (win10)
  • Install and configure IIS + MySQL + nginx + php7.1.7 under Win10
  • mysql5.7.19 winx64 installation and configuration method graphic tutorial (win10)
  • MySQL 5.7.19 installation and configuration method graphic tutorial (win10)
  • About the basic configuration tutorial of MySQL5.7.17 free installation version under Win10 (with pictures and text)
  • win10 mysql 5.6.35 winx64 free installation version configuration tutorial

<<:  How to view server hardware information in Linux

>>:  In-depth explanation of slots and filters in Vue

Recommend

Comparison between Redis and Memcache and how to choose

I've been using redis recently and I find it ...

JavaScript MouseEvent Case Study

MouseEvent When the mouse performs a certain oper...

docker cp copy files and enter the container

Enter the running container # Enter the container...

How to use an image button as a reset form button

When we make a form, we often set a submit button ...

js canvas to realize the Gobang game

This article shares the specific code of the canv...

An exploration of the JS operator in problem

Here's the thing: Everyone knows about "...

CSS3 creates web animation to achieve bouncing ball effect

Basic preparation For this implementation, we nee...

Javascript to achieve drumming effect

This article shares the specific code of Javascri...

How to set the default value of a MySQL field

Table of contents Preface: 1. Default value relat...

Detailed examples of using JavaScript event delegation (proxy)

Table of contents Introduction Example: Event del...

How to install and persist the postgresql database in docker

Skip the Docker installation steps 1. Pull the po...

A brief discussion on how Tomcat breaks the parent delegation mechanism

Table of contents JVM Class Loader Tomcat class l...

MySQL 8.0.12 winx64 decompression version installation graphic tutorial

Recorded the installation of mysql-8.0.12-winx64 ...