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

Vue's new partner TypeScript quick start practice record

Table of contents 1. Build using the official sca...

When should a website place ads?

I recently discussed "advertising" with...

Methods of adaptive web design (good access experience on mobile phones)

1. Add the viewport tag to the HTML header. At th...

Solution to the problem that docker nginx cannot be accessed after running

## 1 I'm learning docker deployment recently,...

Detailed explanation of Vue mixin

Table of contents Local Mixin Global Mixins Summa...

Commonly used English fonts for web page creation

Arial Arial is a sans-serif TrueType font distribu...

Causes and solutions for MySQL deadlock

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

Four ways to modify the default CSS style of element-ui components in Vue

Table of contents Preface 1. Use global unified o...

Vue uses custom instructions to add watermarks to the bottom of the page

Project Scenario Add a custom watermark to the en...

Radio buttons and multiple-choice buttons are styled using images

I've seen people asking before, how to add sty...

JS implements random roll call system

Use JS to implement a random roll call system for...

Graphic tutorial on installing Mac system in virtual machine under win10

1. Download the virtual machine version 15.5.1 I ...