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

Example of how to configure the MySQL database timeout setting

Table of contents Preface 1. JDBC timeout setting...

N ways to center elements with CSS

Table of contents Preface Centering inline elemen...

Sharing of the fast recovery solution for Mysql large SQL files

Preface In the process of using MySQL database, i...

Graphic tutorial on installing Ubuntu 18.04 on VMware 15 virtual machine

In the past few years, I have been moving back an...

How to create a file system in a Linux partition or logical volume

Preface Learn to create a file system on your sys...

Install CentOS system based on WindowsX Hyper-V

At present, most people who use Linux either use ...

wget downloads the entire website (whole subdirectory) or a specific directory

Use wget command to download the entire subdirect...

Detailed explanation of log processing of Docker containers

Docker has many log plug-ins. The default is to u...

Minimalistic website design examples

Web Application Class 1. DownForEveryoneOrJustMe ...

Hide div in HTML Hide table TABLE or DIV content css style

I solved a problem tonight that has been botherin...

How to add double quotes in HTML title

<a href="https://www.jb51.net/" titl...

Introduction to MySQL method of deleting table data with foreign key constraints

When deleting a table or a piece of data in MySQL...

Share JS four fun hacker background effect codes

Table of contents Example 1 Example 2 Example 3 E...

Introduction to the usage of exists and except in SQL Server

Table of contents 1. exists 1.1 Description 1.2 E...