Detailed explanation of the installation steps of the MySQL decompressed version

Detailed explanation of the installation steps of the MySQL decompressed version

1. Go to the official website: D:\mysql-5.7.21-winx64\bin to download

2. Unzip to drive D (personal preference): D:\mysql-5.7.21-winx64

3. Configure environment variables, path: D:\mysql-5.7.21-winx64\bin

4. Check whether the following two configuration paths of the D:\mysql-5.7.21-winx64\my-default.ini file are correct

[mysqld]

basedir=D:\mysql-5.7.21-winx64

datadir=D:\mysql-5.7.21-winx64\data

basedir-----mysql directory

datadir-----mysql directory\data (the data directory is not found in the installation path D:\mysql-5.7.21-winx64, so I created it myself!! However, there will be problems if I create it myself. See step 5 for the problem, so we only need to configure this path and do not need to create the data folder ourselves)

If there is no default.ini file, you can create one yourself and paste the above content

5. Install mysql. Run cmd as an administrator, switch to the bin directory of MySQL installation, and execute the installation statement

Enter the command cd D:\mysql-5.7.21-winx64\bin to enter the bin root directory of mysql;

(Note: If this command cannot be executed successfully, execute D: first, and then execute cd mysql-5.7.21-winx64\bin after successfully switching directories)


(It's been so smooth up to this point?? It's all an illusion!!!)


In fact, it is because you created the data directory yourself in the fourth step, and there is no table structure configuration file required for MySQL startup. The solution is as follows:

First delete the data directory you created, then execute mysqld --initialize-insecure in the bin directory of mysql (do not set the root password), and then start it successfully. After executing mysqld --initialize-insecure, you can see that the data directory is automatically generated under the installation directory and contains many files.


Restarting can start successfully:


6. Check whether you can log in: mysql -u root -p. Since no password is set, you don’t need to enter a password for the first login. Just press Enter to log in successfully.

After setting the password, you need to modify the password reference:

ALTER USER @'localhost' IDENTIFIED BY '

New Password

' PASSWORD EXPIRE NEVER;-- The password will never expire. If you remove NEVER, it will have an expiration date.

The above is a detailed integration of the installation steps of the MySQL decompressed version 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!

You may also be interested in:
  • A concise tutorial on how to install mysql5.7 decompressed version on CentOS7
  • Mysql5.7.17 winx64.zip decompression version installation and configuration graphic tutorial
  • Detailed tutorial on installing MySQL 5.7.19 decompressed version on Windows Server 2016
  • mysql5.7.19 winx64 decompressed version installation and configuration tutorial
  • Install the unzipped version of MySQL on Windows 10 (recommended)
  • MySQL 5.6.14 Win32-bit free installation decompression version configuration tutorial
  • MySQL 5.6.14 win32 decompressed version (free installation) installation and configuration tutorial
  • MySQL 5.6 decompressed version installation and configuration method graphic tutorial (win10)
  • MySQL 5.7.13 decompressed version (free installation) installation and configuration tutorial
  • How to install mysql5.7.16 on win10 (decompressed version)

<<:  Analysis of the implementation principle of Vue instructions

>>:  Linux's fastest text search tool ripgrep (the best alternative to grep)

Recommend

Use CSS to implement special logos or graphics

1. Introduction Since pictures take up a lot of s...

What is jQuery used for? jQuery is actually a js framework

Introduction to jQuery The jQuery library can be ...

Solve the problem of Nginx returning 404 after configuring proxy_pass

Table of contents 1. Troubleshooting and locating...

React uses routing to redirect to the login interface

In the previous article, after configuring the we...

About CSS floating and canceling floating

Definition of Float Sets the element out of the n...

Vue implements small form validation function

This article example shares the specific code of ...

Example of writing mobile H5 to invoke APP (IOS, Android)

iOS 1. URL scheme This solution is basically for ...

JavaScript basics for loop and array

Table of contents Loop - for Basic use of for loo...

MySQL implements an example method of logging in without a password

Specific method: Step 1: Stop the mysql service /...

Javascript design pattern prototype mode details

Table of contents 1. Prototype mode Example 1 Exa...

JavaScript implements password box verification information

This article example shares the specific code of ...

Mysql accidental deletion of data solution and kill statement principle

mysql accidentally deleted data Using the delete ...

Detailed explanation of Nginx current limiting configuration

This article uses examples to explain the Nginx c...