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

Linux traceroute command usage detailed explanation

Traceroute allows us to know the path that inform...

Detailed explanation of the loop form item example in Vue

Sometimes we may encounter such a requirement, th...

Front-end JavaScript operation principle

Table of contents 1. What is a JavaScript engine?...

Design and implementation of Vue cascading drop-down box

Table of contents 1. Database design 2. Front-end...

MySQL Server IO 100% Analysis and Optimization Solution

Preface During the stress test, if the most direc...

Ten useful and simple MySQL functions

function 0. Display current time Command: select ...

Install MySQL (including utf8) using Docker on Windows/Mac

Table of contents 1. Docker installation on Mac 2...

CSS3 text animation effects

Effect html <div class="sp-container"...

Recommended plugins and usage examples for vue unit testing

Table of contents frame First-class error reporti...

Example of deploying Laravel application with Docker

The PHP base image used in this article is: php:7...

15 Best Practices for HTML Beginners

Here are 30 best practices for HTML beginners. 1....

HTTP Status Codes

This status code provides information about the s...

An article to help you learn more about JavaScript arrays

Table of contents 1. The role of array: 2. Defini...

A comparison between the href attribute and onclick event of the a tag

First of all, let's talk about the execution ...

18 Amazing Connections Between Interaction Design and Psychology

Designers need to understand psychology reading n...