MySQL 5.7.10 winx64 installation and configuration method graphic tutorial (win10)

MySQL 5.7.10 winx64 installation and configuration method graphic tutorial (win10)

MySQL is a relatively easy-to-use relational database. Today I reinstalled the win10 system, so I wanted to try to install the unzipped version of MySQL. After the installation is complete, I will write it down and share it with friends in need.

tool:

win10 system 64bit mysql-5.7.10-winx64.zip

Method/Step 1:

To install MySQL, first we have to go to the MySQL official website to download the resources we need, select Downloads—>Community, then you can see MySQL Community Server, which is the version we are going to learn to configure today.

Okay, now you can download the installation package of mysql-5.7.10-winx64.zip version here. The one above is 32-bit, and the one marked in the picture is 64-bit. You can choose to download according to your actual situation.

After a short wait, the installation file was downloaded. The next step is to decompress it. I decompressed the file to drive E and put it in the folder mysql5.7.

Create a new my.ini file, then open it with Notepad and enter the basic configuration of mysql:

[mysql]
; Set the mysql client default character set default-character-set=utf8
[mysqld]
; Set port 3306 port = 3306
; Set the mysql installation directory basedir=E:\mysql5.7

; Set the storage directory of mysql database data datadir=E:\mysql5.7\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

After opening the cmd window as an administrator, switch the directory to the bin directory of your unzipped file. Then enter mysqld install and press Enter to run it. Note that it is mysqld, not mysql.

Next, we use mysqld--initialize to initialize the data directory. Otherwise, there will be no data folder under the mysql5.7 folder. At first, I also felt that something was missing from my file. Let's compare the file changes before and after initialization

The next step is to enter net start mysql to start the service. Or if you don't mind the hassle, just start it manually. Open the service and start the mysql service. At this point, the installation of mysql is basically complete.

Method/Step 2

Okay, here comes the pit. When we installed MySQL before, the root user did not need a password, but this is no longer possible starting from MySQL 5.7. It tricked me for a while, and then I remembered that I didn't set a password. For some reason I started to panic. ERROR 1045 (28000): Access denied for user'root'@'localhost'(using password: NO), so sad.

Don't panic, follow me to shut down the MySQL service first.

Enter the following command in the prompt command management tool to enter safe mode: mysqld --defaults-file="E:\mysql5.7\my.ini" --console --skip-grant-tables. The path here needs to be modified according to the actual path of your installation. OK, let's just leave this window running, and then reopen a command prompt window, remember to have administrator privileges.

Then we continue to enter the username and password to log in, wow, it’s successful. Don't worry, this is just the first step. Next we still have to change the default password of root.

Next, let's select the database currently in use: enter use mysql;

Then I tried to change the password, Emma, ​​the field was wrong.

1. Enter the mysql database:

mysql> use mysql;Database changed

2. Set a new password for the root usermysql> update user set authentication_string=password("new password") where user="root";Query OK,1 rows affected(0.01 sec)Rows matched:1 Changed:1Warnings: 0

3. Refresh the database (be sure to remember to refresh) mysql>flush privileges; QueryOK, 0 rows affected (0.00 sec)

4. Exit mysql:mysql> quit

Next time you enter mysql -uroot -p you can log in with the new password



The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • win10 mysql 5.6.35 winx64 free installation version configuration tutorial
  • MySQL 5.7.13 winx64 installation and configuration method graphic tutorial (win10)
  • Mysql 5.7.17 winx64 free installation version, installation and configuration graphic tutorial under win10 environment
  • Tutorial on installing the green version of mysql-5.7.16-winx64 on 64-bit win10 system
  • Win10 installation of MySQL5.7.18winX64 failed to start the server and no error message

<<:  How to solve jQuery conflict problem

>>:  How to redirect nginx directory path

Recommend

What are the differences between xHTML and HTML tags?

All tags must be lowercase In XHTML, all tags must...

Vue3 Vue CLI multi-environment configuration

Table of contents 1. Introduction 2. Switching 1....

Detailed explanation of the middleman mode of Angular components

Table of contents 1. Middleman Model 2. Examples ...

Common browser compatibility issues (summary)

Browser compatibility is nothing more than style ...

Problems and pitfalls of installing Mysql5.7.23 in Win10 environment

I read many tutorials, but found that I could nev...

How to use Linux locate command

01. Command Overview The locate command is actual...

How to install Composer in Linux

1. Download the installation script - composer-se...

An in-depth introduction to React refs

1. What is Refs is called Resilient File System (...

Methods and techniques for designing an interesting website (picture)

Have you ever encountered a situation where we hav...

Briefly describe how to install Tomcat image and deploy web project in Docker

1. Install Tomcat 1. Find the tomcat image on Doc...

Example of how to set div background transparent

There are two common ways to make div background ...