A tutorial for beginners to install and log in to mysql-8.0.19-winx64 (must-read for beginners)

A tutorial for beginners to install and log in to mysql-8.0.19-winx64 (must-read for beginners)

1. Download the installation package (64-bit)

MySQL official website download link: https://www.mysql.com/cn/

Click to download

Drop down to insert image description here

Scroll down and find the link below

insert image description here

Click on the above link and find the link below

insert image description here

Select the version shown in the picture and click Download.

insert image description here

insert image description here

2. Install MySQL database

Unzip the installation package. Here I unzip the installation package to the MySQL folder on drive D.

insert image description here

Configuring environment variables

(1) Right-click My Computer -> Properties -> Advanced System Settings -> Environment Variables. (2) Select New in System Variables.

insert image description here

(3) Enter the content in the figure below (the variable value changes according to the decompression path of your installation package).

insert image description here

(4) Find Path in the system variables and select Edit.

insert image description here

(5) Click New and enter %MYSQL_HOME%\bin.

insert image description here

3. Configure and initialize the my.ini file

(1) Create a new text document in the folder after unzipping the installation package and rename it to my.ini.

insert image description here

(2) Write the following configuration into the my.ini file.

[mysqld]
# Set port 3306 port=3306

# Customize the installation directory of MySQL, that is, the directory where you unzip the MySQL compressed package basedir=D:\MySQL\mysql-8.0.19-winx64

# Customize the data storage directory of the MySQL database datadir=D:\MySQL\mysql-8.0.19-winx64\data

# Maximum number of connections allowed max_connections=200

# The number of connection failures allowed 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 basedir and datadir paths are written according to their actual paths.)

4.

(1) Run the command prompt as an administrator

insert image description here

(2) Execute the following command in the bin directory of the MySQL installation directory:

mysqld --initialize --console 

insert image description here

The second box contains the default initial password, which you need to remember as it will be used later.

(3) Enter the following command:

mysqld --install

insert image description here

(4) Enter the following command to start MySQL.

net start mysql

insert image description here

(5) Change the initial password. Enter the following command:

mysql -uroot -p

insert image description here

Enter the password in the box above. The password is the initial password noted in step (2) above. Enter the following command to change the password to your own:

alter user 'root'@'localhost' identified by 'jb51jb51';

insert image description here

The second arrow points to your password. You can modify csdncsdn in the above command to your own password according to your actual situation.

(6) Enter exit to exit MySQL and re-enter your password to verify whether the login is successful.

insert image description here

(7) Log out and terminate the MySQL service.

insert image description here

Summarize

This is the end of this article about the illustrated tutorial for beginners to install and log in to mysql-8.0.19-winx64 (a must-read for novices). For more relevant mysql-8.0.19-winx64 installation and login content, 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:
  • Solve the installation problem of mysql8.0.19 winx64 version
  • Problems encountered when installing mysql-8.0.19-winx64: Can't create directory ''xxxx\Database\''
  • MySQL 8.0.19 winx64 installation tutorial and change the initial password under Windows 10
  • mysql 8.0.19 winx64.zip installation tutorial

<<:  Download and install VSCode on Linux and use programming to output the current time

>>:  JavaScript function call, apply and bind method case study

Recommend

Vue backend management system implementation of paging function example

This article mainly introduces the implementation...

Use of LRU algorithm in Vue built-in component keep-alive

Table of contents The use of Vue's keep-alive...

How to use CSS custom variables in Vue

Table of contents The CSS custom variable functio...

Two methods of restoring MySQL data

1. Introduction Some time ago, there were a serie...

Take you to a thorough understanding of the prototype object in JavaScript

Table of contents 1. What is a prototype? 1.1 Fun...

Create an SSL certificate that can be used in nginx and IIS

Table of contents Creating an SSL Certificate 1. ...

How to manage large file uploads and breakpoint resume based on js

Table of contents Preface Front-end structure Bac...

How to restore a database and a table from a MySQL full database backup

In the official MySQL dump tool, how can I restor...

Write a dynamic clock on a web page in HTML

Use HTML to write a dynamic web clock. The code i...

Introduction and use of five controllers in K8S

Table of contents Controller type of k8s Relation...

Web Design Experience: Self-righteous Web Designers

1. Trash or Classic? Web technology updates very ...