MySQL 8.0.21 installation and configuration method graphic tutorial

MySQL 8.0.21 installation and configuration method graphic tutorial

Record the installation and configuration method of MySQL 8.0.21 and share it with everyone.

1. Download

1. Download the installation package

mysql download path

You can also download it by clicking the link directly: mysql 8.0.21

2. Unzip the compressed package

Unzip to the installation directory:

3. Create a new my.ini configuration file in this directory

[mysqld] 
# Set port 3306 port=3306 
# Set the installation directory of mysql basedir=D:\environment\mysql\mysql-8.0.21-winx64
# Set the storage directory of mysql database data datadir=D:\environment\mysql\mysql-8.0.21-winx64\data 
# Maximum number of connections allowed max_connections=200 
# The number of connection failures allowed. This is to prevent someone from trying to attack the database system from this host max_connect_errors = 10 
# The default character set used by the server is UTF8 
character-set-server=utf8 
# The default storage engine that will be used when creating a new table default-storage-engine=INNODB 
# By default, the "mysql_native_password" plug-in is used for authentication. default_authentication_plugin=mysql_native_password 
[mysql] 
# Set the default character set of the mysql client to default-character-set=utf8 
[client] 
# Set the default port used by the mysql client to connect to the server. port=3306 
default-character-set=utf8

Please note that you need to replace basedir and datadir with your own directories.

4. Configure environment variables

This computer->Properties->Advanced system settings->Environment variables->System variables->Path

The bin folder address under the mysql installation directory

5. Create data folder and initialize

Window+R Enter cmd and execute: mysqld --initialize-insecure

The first pitfall: VC++2015 (Microsoft Visual C++ 2015 Redistributable) was not installed. Download vc_redist.x64 and run the program, then install it directly.

The second pitfall:

Since the computer lacks this file, just download it and drop it under C:\Windows\System32.

At this time, execute the command: mysqld --initialize-insecure

There will be an additional data folder in the installation directory

6. Execute initialization statements

mysqld --defaults-file=D:\environment\mysql\mysql-8.0.21-winx64\my.ini --initialize –console

7. Install MySQL

mysqld install

Report another error:

Solution: Select "Open as administrator" when opening the cmd.exe program.

Here is a little extra knowledge: How to run cmd.exe as an administrator in Windows; open drive C->Windows->System32->find cmd.exe, right-click and run as administrator.

Then execute mysqld install, and it will display

8. Initialize MySQL and create the root user after execution

mysqld --initialize-insecure --user=mysql

9. Start MySQL service

net start mysql 

10. Set the root account and password

mysqladmin -u root -p password 123456

After startup, your root user password is empty. Press Enter and “Enter password” will appear. Do not enter any information. Press Enter for the next step. The password is 123456. Do not fill in enter password.

Login User

mysql -u root -p
(After pressing Enter, enter the password. The previously set password is 123456) 

At this point, the login is successful and the installation is complete.

Wonderful topic sharing:

MySQL different versions installation tutorial

MySQL 5.7 installation tutorials for various versions

MySQL 5.6 installation tutorials for various versions

mysql8.0 installation tutorials for various versions

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:
  • Some improvements in MySQL 8.0.24 Release Note
  • MySQL 8.0.23 installation and configuration method graphic tutorial under win10
  • MySQL 8.0.22 installation and configuration method graphic tutorial
  • MySQL 8.0.22 installation and configuration graphic tutorial
  • MySQL 8.0.22 download, installation and configuration method graphic tutorial
  • MySQL 8.0.22 installation and configuration method graphic tutorial under Windows 10
  • MySQL 8.0.22 winx64 installation and configuration method graphic tutorial
  • MySQL 8.0.21 free installation version configuration method graphic tutorial
  • MySQL 8.0.20 Installation Tutorial with Pictures and Text (Windows 64-bit)
  • MySQL 8.0.20 installation and configuration detailed tutorial
  • MySQL 8.0.24 installation and configuration method graphic tutorial

<<:  A brief analysis of the use of zero copy technology in Linux

>>:  JS achieves five-star praise case

Recommend

Detailed explanation of the use of state in React's three major attributes

Table of contents Class Component Functional Comp...

How to optimize MySQL performance through MySQL slow query

As the number of visits increases, the pressure o...

How to install and configure MySQL and change the root password

1. Installation apt-get install mysql-server requ...

Detailed explanation of how Node.js handles ES6 modules

Table of contents 1. Differences between the two ...

The basic principles and detailed usage of viewport

1. Overview of viewport Mobile browsers usually r...

Windows 10 is too difficult to use. How to customize your Ubuntu?

Author | Editor Awen | Produced by Tu Min | CSDN ...

Cross-origin image resource permissions (CORS enabled image)

The HTML specification document introduces the cr...

Linux CentOS6.5 yum install mysql5.6

This article shares the simple process of install...

How to set up Windows Server 2019 (with pictures and text)

1. Windows Server 2019 Installation Install Windo...

Summary of JavaScript Timer Types

Table of contents 1.setInterval() 2.setTimeout() ...

Detailed explanation of computed properties in Vue

Table of contents Interpolation Expressions metho...

MySQL 8.0.18 uses clone plugin to rebuild MGR implementation

Assume that a node in the three-node MGR is abnor...

Mysql error: Too many connections solution

MySQL database too many connections This error ob...

Why does MySQL database index choose to use B+ tree?

Before further analyzing why MySQL database index...