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

A brief analysis of the usage of USING and HAVING in MySQL

This article uses examples to illustrate the usag...

A simple method to be compatible with IE6's min-width and min-height

If a website is widescreen, you drag the browser ...

Detailed explanation of anonymous slots and named slots in Vue

Table of contents 1. Anonymous slots 2. Named slo...

html page!--[if IE]...![endif]--Detailed introduction to usage

Copy code The code is as follows: <!--[if IE]&...

Html long text automatically cuts off when it exceeds the tag width

When we display long text, we often need to interc...

HTML table cross-row and cross-column operations (rowspan, colspan)

Generally, the colspan attribute of the <td>...

HTML discount price calculation implementation principle and script code

Copy code The code is as follows: <!DOCTYPE HT...

mysql trigger creation and usage examples

Table of contents What is a trigger Create a trig...

Xftp download and installation tutorial (graphic tutorial)

If you want to transfer files between Windows and...

Summary of MySQL development standards and usage skills

1. Naming conventions 1. Database names, table na...

JS cross-domain solution react configuration reverse proxy

Cross-domain solutions jsonp (simulate get) CORS ...