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

Detailed tutorial on installing Python 3.6.6 from scratch on CentOS 7.5

ps: The environment is as the title Install possi...

img usemap attribute China map link

HTML img tag: defines an image to be introduced in...

Vue3+script setup+ts+Vite+Volar project

Table of contents Create a vue + ts project using...

Vue computed properties

Table of contents 1. Basic Examples 2. Computed p...

Analysis and solution of Chinese garbled characters in HTML hyperlinks

A hyperlink URL in Vm needs to be concatenated wit...

How to implement two-way binding function in vue.js with pure JS

Table of contents First, let's talk about the...

Causes and solutions for MySQL deadlock

The database, like the operating system, is a sha...

Detailed explanation of count without filter conditions in MySQL

count(*) accomplish 1. MyISAM: Stores the total n...

CSS specification BEM CSS and OOCSS sample code detailed explanation

Preface During project development, due to differ...

How to store false or true in MySQL

MySQL Boolean value, stores false or true In shor...

How to use Celery and Docker to handle periodic tasks in Django

As you build and scale your Django applications, ...

Complete steps for using Echarts and sub-packaging in WeChat Mini Program

Preface Although the holiday is over, it shows up...