The latest version of MySQL 8.0.22 download and installation super detailed tutorial (Windows 64 bit)

The latest version of MySQL 8.0.22 download and installation super detailed tutorial (Windows 64 bit)

Preface

A few days ago, I downloaded and installed the latest version of MySQL 8.0.22. I encountered many problems. I referred to some methods and finally solved them. Today I recorded my installation process, hoping it will be helpful to you.

1. Download MySQL 8.0.22 from the official website

Click to enter the MySQL official website: https://www.mysql.com/

① Click DOWNLOADS

insert image description here

② Scroll down and find MySQL Community (GPL) Downloads and click to enter

insert image description here

③ MySQL Community Server

insert image description here

④Download

insert image description here

⑤ Unzip, the internal files are as shown in the figure (data and database are created later, there are no such two folders in the downloaded file)

insert image description here

2. Set environment variables

① Find the control panel and enter in the order of "Control Panel - System and Security - System - Advanced System Settings - Environment Variables".

insert image description here

② First find "path", then write the path of the bin folder in the downloaded MySQL file. Then keep clicking OK to exit the control panel.
(The access path of my bin in the computer is D:\mysql-server\mysql-8.0.22-winx64\bin. It is recommended to install it in the D drive)

insert image description here

3. Create the initialization file mysql.ini

① Creation method: Create a new text document and change the suffix to ".ini". You can name it as you like. I named it mysql.ini

insert image description here

②Click to enter the .ini file and copy the following content into it
Note: Change the location of the mysql folder in basedir and datadir to the path of mysql-8.0.22-22-winx64 downloaded on your computer. Do not change the '\Data' after datadir. Do not create the Data folder manually.

[mysqld]
# Set port 3306 port=3306
# Set the installation directory of mysql to basedir=D:\mysql-server\mysql-8.0.22-winx64
# Set the storage directory of mysql database data datadir=D:\mysql-server\mysql-8.0.22-winx64\Data
# Maximum number of connections allowed max_connections=200
# The number of connection failures allowed.
max_connect_errors=10
# The default character set used by the server is utf8mb4
character-set-server=utf8mb4
# The default storage engine that will be used when creating a new table default-storage-engine=INNODB
#Default authentication is done with the "mysql_native_password" plugin #mysql_native_password
default_authentication_plugin=mysql_native_password
[mysql]
# Set the default character set of the mysql client to default-character-set=utf8mb4
[client]
# Set the default port used by the mysql client to connect to the server port = 3306
default-character-set=utf8mb4

3. Initialize MySQL

① Follow the path shown in the figure to find the location of cmd, right-click and select Run as Administrator. Note that you must run it as an administrator , otherwise an error will be reported.

insert image description here

② Enter the bin directory of mysql
Do not enter cmd directly in the path bar under the bin directory (this will not be the administrator and will result in an error)

insert image description here
Do not enter cmd directly in the bin directory, otherwise problems may occur later.

③ Enter the following command

mysqld --initialize --console 

After running, a string of passwords will appear. Please remember this password for subsequent operations:

The root@localhost is the password. Please remember it so that you can modify it later.

4. Install MySQL service

① Continue to enter the following commands in the cmd window

mysqld --install

Since I have already installed it, it says “already exists” here. The first successful sign should be "Service successfully installed!"

insert image description here

② Continue to enter the following command in the cmd window to start the MySQL service

net start mysql

When it appears

MySQL service is starting
MySQL service has been started successfully

When you see the prompt, it means you have started successfully.

5. Change MySQL password

The automatically generated password is too complex and needs to be entered every time you log in. To facilitate login, you need to change the password.

Continue typing in the cmd window

mysql -u root -p

Then enter the password you just generated;

Then continue to enter

ALTER USER 'root'@'localhost' IDENTIFIED BY 'your password';

Modification successful;

Enter exit to exit MySQL. The MySQL installation is successfully completed.

insert image description here

Summarize

① The cmd window needs to be run as an administrator. Do not press win+R directly for convenience, or directly enter cmd in the bin directory, otherwise an error will be reported.
② Be sure to remember the generated password.
③ Switch to the bin folder of MySQL in drive D: cd/d D:\mysql-server\mysql-8.0.22-winx64\bin

This is the end of this article about the latest version of MySQL 8.0.22 download and installation super detailed tutorial (Windows 64-bit). For more relevant MySQL 8.0.22 download and installation content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • MySQL 8.0.28 installation and configuration method graphic tutorial
  • How to install MySQL 8.0.28.0.msi on Windows (with pictures and text)
  • Install MySQL 8.0.28 on Kylin V10 and implement remote access
  • MySQL 8.0.22 installation and configuration method graphic tutorial
  • MySQL 8.0.22 compressed package complete installation and configuration tutorial diagram (tested and effective)
  • MySQL 8.0.22 installation and configuration graphic tutorial
  • MySQL 8.0.22 download, installation and configuration method graphic tutorial
  • Super detailed MySQL8.0.22 installation and configuration tutorial
  • MySQL 8.0.19 installation and configuration method graphic tutorial
  • MySQL 8.0.28 installation and configuration tutorial under Windows

<<:  Solve the problem that changes to the Docker MySQL container database do not take effect

>>:  HTML Tutorial: Ordered Lists

Recommend

jQuery implements navigation bar effect with expansion animation

I designed and customized a navigation bar with a...

Use of Linux sed command

1. Function Introduction sed (Stream EDitor) is a...

Implementation of multi-environment configuration (.env) of vue project

Table of contents What is multi-environment confi...

Summary of ten Linux command aliases that can improve efficiency

Preface Engineers working in the Linux environmen...

Vue realizes simple effect of running light

This article shares the specific code of Vue to a...

Methods and techniques for designing an interesting website (picture)

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

Use Angular CDK to implement a Service pop-up Toast component function

Table of contents 1. Environmental Installation 2...

HTML markup language - form

Click here to return to the 123WORDPRESS.COM HTML ...

Getting Started Guide to MySQL Sharding

Preface Relational databases are more likely to b...

Summary of common functions of PostgreSQL regular expressions

Summary of common functions of PostgreSQL regular...

A brief discussion on the implementation principle of Vue slot

Table of contents 1. Sample code 2. See the essen...

MySQL 5.7.24 installation and configuration graphic tutorial

This article shares the installation and configur...

Example of how to build a Mysql cluster with docker

Docker basic instructions: Update Packages yum -y...

The difference between animation and transition

The difference between CSS3 animation and JS anim...

Error mysql Table 'performance_schema...Solution

The test environment is set up with a mariadb 5.7...