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

How to obtain root permissions in a docker container

First, your container must be running You can vie...

Detailed explanation of MLSQL compile-time permission control example

Preface The simple understanding of MySQL permiss...

Methods of adaptive web design (good access experience on mobile phones)

1. Add the viewport tag to the HTML header. At th...

Vue parent component calls child component function implementation

Vue parent component calls the function of the ch...

MySQL installation tutorial under Windows with pictures and text

MySQL installation instructions MySQL is a relati...

Summary of Mysql exists usage

Introduction EXISTS is used to check whether a su...

Implementation of rewrite jump in nginx

1. New and old domain name jump Application scena...

Analysis of Docker's method for creating local images

The so-called container actually creates a readab...

Analysis of the usage of Xmeter API interface testing tool

XMeter API provides a one-stop online interface t...

Implementation of drawing audio waveform with wavesurfer.js

1. View the renderings Select forward: Select bac...

Understand the principle of page replacement algorithm through code examples

Page replacement algorithm: The essence is to mak...

HTML tutorial, HTML default style

html , address , blockquote , body , dd , div , d...