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

Debian virtual machine created by VirtualBox shares files with Windows host

the term: 1. VM: Virtual Machine step: 1. Downloa...

Specific use of lazy loading and preloading in js

Delayed loading (lazy loading) and preloading are...

The best solution for implementing digital plus and minus buttons with pure CSS

Preface: For the implementation of digital additi...

Share 20 JavaScript one-line codes

Table of contents 1. Get the value of browser coo...

Detailed explanation of making shooting games with CocosCreator

Table of contents Scene Setting Game Resources Tu...

Detailed steps for setting up and configuring nis domain services on Centos8

Table of contents Introduction to NIS Network env...

A detailed introduction to Linux file permissions

The excellence of Linux lies in its multi-user, m...

How to use watch listeners in Vue2 and Vue3

watch : listen for data changes (change events of...

Detailed explanation of the role of the new operator in Js

Preface Js is the most commonly used code manipul...

Tutorial on installing DAMO database on Centos7

1. Preparation After installing the Linux operati...

Native JS realizes the special effect of spreading love by mouse sliding

This article shares with you a js special effect ...

How to clean up Alibaba Cloud MySQL space

Today I received a disk warning notification from...

The connection between JavaScript constructors and prototypes

Table of contents 1. Constructors and prototypes ...