Detailed tutorial for downloading and installing mysql8.0.21

Detailed tutorial for downloading and installing mysql8.0.21

Official website address: https://www.mysql.com/

Installation suggestion: Try not to use .exe to install, use a compressed package to install, which is more convenient for future uninstallation

Download address: https://dev.mysql.com/downloads/mysql/

1. Download the zip compressed package

2. Unzip to the directory to be installed

Here I am: D:\Program File\MySQL\mysql-8.0.21-winx64, added the data directory

3. Add environment variables

My Computer -> Properties -> Advanced -> Environment Variables

Select path to add: bin folder address under MySQL installation directory: D:\Program File\MySQL\mysql-8.0.21-winx64\bin

This method does not require adding the %MySQL_HOME% variable

4. Create a new mysql configuration file

In your MySQL installation directory, create a new my.ini file, edit the my.ini file, and pay attention to replacing the path location

[mysqld]
basedir=D:\Program File\MySQL\mysql-8.0.21-winx64\
datadir=D:\Program File\MySQL\mysql-8.0.21-winx64\data\
port=3306

The newly added data directory above

5. Install MySQL service

Start cmd in administrator mode, switch the path to the bin directory under the MySQL installation directory, and enter the following command

cd \d D:\Program File\MySQL\mysql-8.0.21-winx64\bin
mysqld -install

Please note that you must be in administrator mode.

6. Initialize data files

Enter the following command: mysqld --initialize-insecure --user=mysql

7. Start mysql: net start mysql

8. Enter the MySQL management interface to change the password (enter the password for the first time and press Enter)

Enter the first command below to enter the management interface (no space after p!!)

Enter the second command to change the password (there must be a semicolon at the end)

mysql -u root -p #Just press Enter when you enter your password ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your password';

Note that the second command must have a semicolon. Success will be achieved if the following result appears

9. Restart mysql and it will work normally

#Exit mysql management interface exit
#Stop the mysql service net stop mysql
#Start mysql service net start mysql

Summarize

This is the end of this article about the detailed tutorial on downloading and installing mysql8.0.21. For more relevant detailed tutorials on downloading and installing mysql8.0.21, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Detailed explanation of the underlying implementation of descending index, a new feature of MySQL 8
  • MySQL 8 new features: Descending index details
  • In-depth explanation of binlog in MySQL 8.0
  • Detailed steps for configuring mysql8.0.20 with binlog2sql and simple backup and recovery
  • How to quickly add columns in MySQL 8.0
  • MySQL 8.0.21 installation tutorial with pictures and text
  • MySQL 8.0.21 installation tutorial under Windows system (illustration and text)
  • MySQL 8.0.21.0 Community Edition Installation Tutorial (Detailed Illustrations)
  • VS2019 connects to mysql8.0 database tutorial with pictures and text
  • Descending Index in MySQL 8.0

<<:  Steps for customizing node installation to change the default installation path of npm global modules

>>:  Solve the problem of qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in Qt under Ubuntu 18.04

Recommend

JS realizes the calculation of the total price of goods in the shopping cart

JS calculates the total price of goods in the sho...

How to create Baidu dead link file

There are two types of dead link formats defined b...

A brief discussion on using virtual lists to optimize tables in el-table

Table of contents Preface Solution Specific imple...

Analysis of statement execution order of sql and MySQL

I encountered a problem today: Can I use the as a...

A detailed discussion of evaluation strategies in JavaScript

Table of contents A chestnut to cover it Paramete...

Use VSCode's Remote-SSH to connect to Linux for remote development

Install Remote-SSH and configure it First open yo...

CSS example code for setting scroll bar style

The CSS implementation code for setting the scrol...

Detailed explanation of the basic usage of the Linux debugger GDB

Table of contents 1. Overview 2. gdb debugging 2....

How to modify mysql to allow remote connections

Regarding the issue of MySQL remote connection, w...