MySQL 8.0.20 installation and configuration detailed tutorial

MySQL 8.0.20 installation and configuration detailed tutorial

This article shares with you a detailed tutorial on how to install and configure MySQL 8.0.20 for your reference. The specific contents are as follows

1. Download the mysql8.0.20 installation package

MySQL official website: link

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

Find the installation package and download it. (The official website is in English. If you don’t understand it, you can copy the website to Google for translation)

Click Skip login to download directly to your local computer.

Install mysql1. After downloading, it is a zip compressed file

Unzip it.

2. After decompression, set the environment variables

Right-click My Computer ===>Click Properties ===>Click Advanced System Settings ===>Environment Variables ===>System Variable Path ===>Edit ===>
Create a new one (put the path where mysql is installed)

Click Advanced system settings

Click on Environment Variables

Find path in system variables and click edit

Click New and put the bin path where you installed MySQL.

Mine is D:\JAVA\mysql8.0(Windows)\mysql-8.0.20-winx64\mysql-8.0.20-winx64\bin, so this path is written in the environment variable. After configuring the environment variables, click OK.

3. Configure MySQL

Because there is no my.ini file in the zip of the latest version, you need to create a new my.ini file yourself. (my.ini is some configuration, such as port, number of connections, etc.)

Remember to check the location, don’t make a mistake!

[mysqld]
#Set port 3306 port=3306
#Set the installation directory of mysql basedir=D:\JAVA\mysql8.0(Windows)\mysql-8.0.20-winx64\mysql-8.0.20-winx64
#Set the storage directory of mysql database datadatadir=D:\JAVA\mysql8.0(Windows)\mysql-8.0.20-winx64\mysql-8.0.20-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 uses the "mysql_native_password" plugin #mysql_native_password
default_authentication_plugin=mysql_native_password
[mysql]
#Set the default character set of MySQL client 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

Remember to modify the mysql installation path to be consistent with your own installation path.

4. Initialize and start mysql

1. Please note that some tutorials may ask you to create a new data folder in the root directory of mysql-8.0.20-winx64 if there is no data folder. This is problematic. When you use the command line to install MySQL later, you will not be able to find the initial login password. In fact, a new data folder will be automatically created when you enter the mysqld --initialize command to initialize MySQL.

If not, remember to create one manually.

2.

Enter cmd in the bin directory and open the command as an administrator.

After entering cmd, press Enter

You can also open the cmd command directly as an administrator, and then use the cd command to switch to the bin directory

Then run

mysqld --initialize --console

Order. After execution, find the sentence A temporary password is generated for root@localhost:. The initial password is after localhost.

Start service input

net start mysql

enter

mysql -u root -p

Log in to the database, and you will be prompted for a password. Then use the password above to log in and modify the password statement:

ALTER USER root@localhost IDENTIFIED BY '123456';

Change password to: 123456
To delete mysql, execute the command

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.21 installation and configuration method graphic tutorial
  • MySQL 8.0.20 Installation Tutorial with Pictures and Text (Windows 64-bit)
  • MySQL 8.0.24 installation and configuration method graphic tutorial

<<:  Record the process of connecting to the local Linux virtual machine via SSH

>>:  Vue echarts realizes dynamic display of bar chart

Recommend

MySQL Server 8.0.3 Installation and Configuration Methods Graphic Tutorial

This document records the installation and config...

Sample code for installing Jenkins using Docker

Two problems that are easy to encounter when inst...

Detailed explanation of mysql scheduled tasks (event events)

1. Brief introduction of the event An event is a ...

MySQL Installer Community 5.7.16 installation detailed tutorial

This article records the detailed tutorial of MyS...

Detailed explanation of CSS3 to achieve responsive accordion effect

I recently watched a video of a foreign guy using...

MySQL Innodb key features insert buffer

Table of contents What is insert buffer? What are...

How to use nginx to simulate canary release

This article introduces blue-green deployment and...

Implementation of Docker data volume operations

Getting Started with Data Volumes In the previous...

Comparing Node.js and Deno

Table of contents Preface What is Deno? Compariso...

CSS optimization skills self-practice experience

1. Use css sprites. The advantage is that the smal...

Basic usage knowledge points of mini programs (very comprehensive, recommended!)

Table of contents What to do when registering an ...

A brief discussion of several browser compatibility issues encountered

background Solving browser compatibility issues i...