MySQL 8.0.20 installation tutorial and detailed tutorial on installation issues

MySQL 8.0.20 installation tutorial and detailed tutorial on installation issues

Original address: https://blog.csdn.net/m0_46579864/article/details/105981304

Download the MySQL installation package from the official website

1. Download link as follows:

MySQL version 8.0.20

https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-20.html

Other versions: MySQL 8.0.16

2. The MySQL 8.0.20 version compressed package is decompressed as shown below:

Image of MySQL 8.0.20 after decompression

Add and configure the my.ini file

Add the my.ini file in the original decompression root directory :
Create a new text file, that is, a Notepad file, and name it my.ini (that is, the extension is in ini format). If you cannot change the extension, click here to learn more about the solution.

Write the following basic configuration in the my.ini file :

[mysqld]
# Set port 3306 port=3306
# Set the installation directory of MySQL basedir=D:\\Program Files\\MySQL
# Set the storage directory of mysql database data#datadir=D:\\Program Files\\MySQL\\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. After the configuration file is processed, the files in the root directory are as follows:

insert image description here

4. Notes :
MySQL versions below 8.0.18 need to manually configure the Data folder (remove the # sign from the front of the datadir line that I commented out, as shown below). The path filled in is the path location where you want to install MySQL!

datadir=D:\\Program Files\\MySQL\\Data

Configure system variables and initialize MySQL

1. Create the installation location for MySQL:
Create a Program Files folder on drive D, create a MySQL folder under it, and then copy the MySQL files you just unzipped and the my.ini file you just added to this folder. The effect is as follows (you can also install it on other disks, but pay attention to the path of the configuration file in the my.ini file):

File status under MySQL installation file location

2. Configure the system environment variable Path

Add the path of the bin folder to the path variable, then save and exit. Click Go to learn how to open the system environment.

insert image description here

3. Initialize MySQL
Run cmd as an administrator. Click here to learn how to run cmd as an administrator.

insert image description here

4. Execute the command to enter the bin directory of the MySQL installation location:
If the installation location is not the system drive (C drive), then you need to add /d to the command. If it is the system drive (C drive), you do not need to add /d.

cd /d D:\Program Files\MySQL\bin

5. Execute the MySQL installation command:

mysqld --initialize --console

After successful installation, please remember the initial password of the data layer:
The password is root@localhost:

Initial password after successful database installation

Install and start MySQL

1. Execute the command to install the MySQL service:

mysqld --install

insert image description here

2. Execute the command to start the MySQL service:

net start mysql

insert image description here

Navicat connects to MySQL and changes its password

1. Open Navicat and connect to the database you just created

insert image description here
insert image description here

2. Change the data password (remember the new password)
After the database connection is successful, a password change window will pop up. Just enter the new password in this window!

Change Database Password

Click to learn the basic usage of Navicat

Common problems and solutions during installation

1. MySQL installation was not initialized properly:

That is, the account and password column does not appear, as shown in the figure below. The reason for this is that there is a problem with the encoding format of the configuration file my.ini (when directly copying someone else's my.ini file, some systems will change the original encoding format), which causes garbled characters to appear when calling in the command line window and cannot be recognized normally.

MySQL was not initialized properly

Solution:

a. Delete the original my.ini file and create a new Notepad document in the root directory of the MySQL installation location;
b. Save the newly created Notepad file as my Notepad file in the directory. The encoding format of the document when saving is ANSL

Change the encoding format of the Notepad file

c. Then change the extension of the my.txt file to ini, enter the configuration information and click Save, then re-initialize the MySQL installation in the command box to solve the problem.

2.mysql.exe - System Error (due to VCRUNTIME140_1.dll not found...)

The reason for this type of error is that the system lacks a common command plug-in. This problem can be solved by downloading and installing it.

The system is missing a plug-in

Related software download links

1. Navicat 15 version

Summarize

This is the end of this article about the MySQL 8.0.20 installation tutorial and the detailed tutorial on how to solve installation problems. For more relevant MySQL 8.0.20 installation 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:
  • MySQL 8.0.22 installation and 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
  • Detailed tutorial on installing mysql-8.0.20 under Linux
  • mysql 8.0.20 winx64.zip compressed version installation and configuration method graphic tutorial
  • MySQL 8.0.20 winx64 installation and configuration method graphic tutorial
  • MySQL 8.0.19 installation and configuration method graphic tutorial
  • MySQL 8.0.19 installation and configuration tutorial under Windows 10
  • MySQL 8.0.18 installation and configuration graphic tutorial
  • MySQL 8.0.22 installation and configuration graphic tutorial

<<:  Detailed tutorial on running Tomcat in debug mode in IDEA Maven project

>>:  Detailed explanation of the API in Vue.js that is easy to overlook

Recommend

How to Install Oracle Java 14 on Ubuntu Linux

Recently, Oracle announced the public availabilit...

HTML tag full name and function introduction

Alphabetical DTD: Indicates in which XHTML 1.0 DT...

Example code for implementing triangles and arrows through CSS borders

1. CSS Box Model The box includes: margin, border...

The grid is your layout plan for the page

<br /> English original: http://desktoppub.a...

Nginx domain name SSL certificate configuration (website http upgraded to https)

Preface HTTP and HTTPS In our daily life, common ...

Three common uses of openlayers6 map overlay (popup window marker text)

Table of contents 1. Write in front 2. Overlay to...

CSS code to distinguish ie8/ie9/ie10/ie11 chrome firefox

Website compatibility debugging is really annoyin...

Example of deploying Laravel application with Docker

The PHP base image used in this article is: php:7...

Solve the problem of black screen when starting VMware virtual machine

# Adjust VMware hard disk boot priority Step 1: E...

How to install the graphical interface in Linux

1. Linux installation (root user operation) 1. In...

WeChat applet custom scroll-view example code

Mini Program Custom Scroll-View Scroll Bar Withou...

How to change mysql password under Centos

1. Modify MySQL login settings: # vim /etc/my.cnf...

CSS example code for setting scroll bar style

The CSS implementation code for setting the scrol...

Json advantages and disadvantages and usage introduction

Table of contents 1. What is JSON 1.1 Array liter...