MySQL 8.0.16 installation and configuration method graphic tutorial under Windows

MySQL 8.0.16 installation and configuration method graphic tutorial under Windows

This article records the installation graphic tutorial of MySQL 8.0.16 for your reference. The specific contents are as follows

1. Download MySQL 8.0.16

The official link can be used to download the zip compressed package directly

Unzip it after downloading. My decompression location is D:\Program Files (x86)\mysql-8.0.16-winx64

2. Then modify the environment variables.

Add the variable MYSQL_HOME in the system variables, and the variable value is the installation path D:\Program Files (x86)\mysql-8.0.16-winx64\mysql-8.0.16-winx64.

Add %MYSQL_HOME%\bin to path

Note that there is no semicolon after it.

3. Initialize and install

Note that the new version does not need to create a data folder and my.ini file like the online one.

Open cmd directly as an administrator and enter the command:

mysqld --initialize --console

After initializing serve, the following display appears:

Note that the yellow one is a temporary random password, you can write it down as you will need it later. At the same time, a data folder is generated under the path.

To install after initialization, use:

mysqld --install

If you want to uninstall, you can use mysqld --remove

4. Start the service and change the password

Start the service with the following command

net start mysql

After startup, you need to change your password to your own and enter the command to log in:

mysql -uroot -p

Log in using the temporary password you just generated, and then use the command

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

Change it to your own password. The new password must be more than 6 digits.

Enter quit; to exit mysql

5. Log in to mysql

First start the mysql service, and run cmd as an administrator. If you open PowerShell by shift+right clicking in a folder, it won't work because you don't have administrator privileges. After opening, input:

After startup, enter mysql -uroot -p

Then enter your password to log in. Here -p refers to the password. If there is no password, you can omit -p.

6. Change password

If you want to change the password, you can open cmd with administrator privileges and enter:

mysqladmin -u root -p password new password

Then enter the old password and the change will be successful.

7. Automatically start mysql at boot

Since it is troublesome to start MySQL manually every time, you can set it to start MySQL automatically when Windows starts.

Enter the command line window as an administrator and run

mysqld -nt --install

This way, the next time you boot up, you can directly run mysql -u [user name] -p to log in without having to manually start the service.

Wonderful topic sharing:

MySQL different versions installation tutorial

MySQL 5.7 installation tutorials for various versions

MySQL 5.6 installation tutorials for various versions

mysql8.0 installation tutorials for various versions

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • MySQL 8.0.18 installation and configuration method graphic tutorial under win10 (windows version)
  • MySQL 8.0.18 installation and configuration method graphic tutorial
  • mysql 8.0.18.zip installation and configuration method graphic tutorial (windows 64 bit)
  • MySQL 8.0.18 installation and configuration method graphic tutorial (linux)
  • MySQL 8.0.18 installation and configuration method graphic tutorial under MacOS
  • MySQL 8.0 installation and configuration tutorial
  • MySQL 8.0.11 installation summary tutorial diagram
  • MySQL 8.0.12 installation and configuration method graphic tutorial
  • MySQL 8.0.15 installation and configuration tutorial under Win10
  • mysql 8.0.19 win10 quick installation tutorial

<<:  Docker uses the mysqldump command to back up and export mysql data in the project

>>:  Detailed explanation of Bootstrap grid vertical and horizontal alignment

Recommend

How MySQL supports billions of traffic

Table of contents 1 Master-slave read-write separ...

Detailed explanation of scheduled tasks for ordinary users in Linux

Preface Ordinary users define crontab scheduled t...

HTML uses the title attribute to display text when the mouse hovers

Copy code The code is as follows: <a href=# ti...

Usage and best practice guide for watch in Vue3

Table of contents Preface🌟 1. API Introduction 2....

Detailed explanation of the correct use of the count function in MySQL

1. Description In MySQL, when we need to get the ...

Detailed explanation of commonly used nginx rewrite rules

This article provides some commonly used rewrite ...

JS+Canvas draws a lucky draw wheel

This article shares the specific code of JS+Canva...

Implementing the preview function of multiple image uploads based on HTML

I recently wrote a script for uploading multiple ...

Alibaba Cloud Ubuntu 16.04 builds IPSec service

Introduction to IPSec IPSec (Internet Protocol Se...

Detailed explanation of the use of props in React's three major attributes

Table of contents Class Component Functional Comp...

Docker image compression and optimization operations

The reason why Docker is so popular nowadays is m...

Example code of CSS layout at both ends (using parent's negative margin)

Recently, during the development process, I encou...

How to copy MySQL table

Table of contents 1.mysqldump Execution process: ...

HTML table markup tutorial (1): Creating a table

<br />This is a series of tutorials provided...

How to insert 10 million records into a MySQL database table in 88 seconds

The database I use is MySQL database version 5.7 ...