MySQL 8.0.18 installation tutorial under Windows (illustration)

MySQL 8.0.18 installation tutorial under Windows (illustration)

Download

Download address: https://dev.mysql.com/downloads/mysql/

insert image description here

Unzip and install

Unzip the downloaded zip archive to your installation directory


insert image description here

Configuration environment and files

(1) Configure the my.ini file. After decompression, two files are missing, one is the my.ini file and the other is the data folder. Create a my.ini file and copy the following content into it:

[mysqld] 
#Set port 3306 port = 3306
# Set the installation directory of mysql to basedir=E:\installSoftWare\Sql\mysql-8.0.18-winx64 
# Set the storage directory of mysql database data datadir=E:\installSoftWare\Sql\mysql-8.0.18-winx64\data
# Maximum number of connections allowed max_connections=200 
# The default character set used by the server is the 8-bit latin1 character set character-set-server=utf8 
# 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=utf8
[client]
# Set the default port used by the mysql client to connect to the server port = 3306
default-character-set=utf8

The two installation directories that need to be modified are basedir and datadir, one is the installation directory of mysql, and the other is the storage directory of mysql data

(2) Configuring the environment


insert image description here
insert image description here
insert image description here
insert image description here

Just add your MySQL bin path to the path variable, for example:

E:\installSoftWare\Sql\mysql-8.0.18-winx64\bin

Initialize MySQL + install MySQL service + change password

Proceed as follows:


insert image description here

First, use the command to enter your installation directory. For example, if the installation directory is drive D, D:\MySQL\mysql-8.0.16-winx64\bin, perform the corresponding process in this directory and then enter the initialization command: mysqld --initialize --console

Note: Remember the initial password, you will need to modify it later


insert image description here

Then start installing the MySQL service. If the service name is mysql8, enter the command:

mysqld install Mysql8

After successful installation, you will be prompted:

Service successfully installed.

The next step is to start the service and enter the following command:

net start Mysql8

This command is used to start the service, and net stop Mysql8 is used to shut down the service.

After the opening is successful, the following prompt will appear:


insert image description here

Then use the command mysql -u root -p to start logging in. After pressing Enter, you will be prompted to enter the password. At this time, use the initial password you remembered before to log in


insert image description here

Then start changing the password and enter the following command:

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new password';

The following prompt appears when the modification is successful:


insert image description here

Then you can log in using the new password.

Summarize

The above is the installation of MySQL8.0.18 under Windows introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • Detailed explanation of the idea of ​​installing mysql8.0.11 and changing the root password and connecting navicat for mysql
  • MySQL 8.0.11 installation summary tutorial diagram
  • How to correctly modify the ROOT password in MySql8.0 and above versions
  • mysql8.0.11 winx64 installation and configuration method graphic tutorial (win10)
  • How to quickly add columns in MySQL 8.0
  • MySQL 8.0.21 installation tutorial with pictures and text
  • Analysis of the new features of MySQL 8.0 - transactional data dictionary and atomic DDL
  • MySQL 8.0.20 compressed version installation tutorial with pictures and text
  • Detailed explanation of MySQL 8.0 dictionary table enhancement
  • MySQL 8.0.21 installation tutorial under Windows system (illustration and text)
  • Detailed explanation of invisible indexes in MySQL 8.0

<<:  Nginx implements dynamic and static separation example explanation

>>:  Vue scroll down to load more data scroll case detailed explanation

Recommend

Implementation of vertical centering with unknown height in CSS

This article mainly introduces the implementation...

A brief discussion on MySQL user permission table

MySQL will automatically create a database named ...

MySQL trigger principle and usage example analysis

This article uses examples to explain the princip...

Briefly talk about mysql left join inner join

Preface I have been busy developing a cold chain ...

Some issues we should pay attention to when designing a web page

Web design, according to personal preferences and ...

Solution to the problem of data loss when using Replace operation in MySQL

Preface The company's developers used the rep...

Introduction to using MySQL commands to create, delete, and query indexes

MySQL database tables can create, view, rebuild a...

Method of iframe adaptation in web responsive layout

Problem <br />In responsive layout, we shou...

JavaScript to achieve the idea of ​​​​snake game

The implementation idea of ​​the javascript game ...

JavaScript file loading and blocking issues: performance optimization case study

Let me start with a question: When writing an HTM...

Can CSS be used like this? The art of whimsical gradients

In the previous article - The charm of one line o...