MySQL 8.0.19 winx64 installation tutorial and change the initial password under Windows 10

MySQL 8.0.19 winx64 installation tutorial and change the initial password under Windows 10

This article shares the installation tutorial of MySQL 8.0.19 winx64 for your reference. The specific content is as follows

1. Download mysql-8.0.19-winx64

1.1 Access address: https://dev.mysql.com/downloads/mysql/

1.2 Unzip the zip package and put the unzipped file mysql-8.0.19-winx64 in the desired location, such as the D drive, as shown in the figure:

1.3 Configure environment variables (to avoid repeatedly switching paths when operating in the CMD window)

Add D:\mysql-8.0.19-winx64\bin under Path

After the environment variables are set, you can directly enter mysql to log in when you reopen CMD or Windows Powershell in the future, without having to switch to the mysql bin directory and execute commands.

1.4 No need to write my.ini configuration file (note)

Now after the new version of MySQL is installed, there is no my.ini (or my-default.ini) file. And we don't need to add it ourselves, because adding it may cause MySQL to fail to start. I have tried it. Because many blog tutorials on the Internet have said to add a my.ini (or my-default.ini) file, but we don’t need to add it now.

2. MySQL initialization and service installation

2.1 Press the "win" key to open the start menu, enter "cmd" in the search box, select the "Command Prompt" program in the search results, right-click and select "Run as administrator"

2.2 Initialization

Open CMD or Windows Powershell with administrator privileges
Use command: mysqld --initialize --console
The operation after using the CMD command is as follows:

C:\Windows\system32>D:\Python\mysql-8.0.12-winx64\bin\mysqld --initialize --console
2018-09-13T14:36:55.758742Z 0 [System] [MY-013169] [Server] D:\Python\mysql-8.0.12-winx64\bin\mysqld (mysqld 8.0.12) initializing of server in progress as process 3104
2018-09-13T14:37:12.072904Z 5 [Note] [MY-010454] [Server] A temporary **password is generated for root@localhost: `4P!w2fqBruGi`**
2018-09-13T14:37:23.274980Z 0 [System] [MY-013170] [Server] D:\Python\mysql-8.0.12-winx64\bin\mysqld (mysqld 8.0.12) initializing of server has completed

Write down the password. The password here is 4P!w2fqBruGi . The password is randomly generated and different for each person. The password generated here will be used when changing the password later.

2.3 Install MySQL service

Use the command: mysqld --install

C:\Windows\system32>D:\Python\mysql-8.0.12-winx64\bin\mysqld --install
Service successfully installed.

2.4 Enabling Services

Use the command: net start mysql

C:\Windows\system32>D:\Python\mysql-8.0.12-winx64\bin>net start mysql
MySQL service is starting..
The MySQL service has been started successfully.

2.5 Change Password

Enter the command to log in: mysql -u root -p
Enter the password you just saved, such as 4P!w2fqBruGi
Use command: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new password';
Note that the password must be more than 6 digits. For example, the password I set is 123456

D:\Python\mysql-8.0.12-winx64\bin>mysql -u root -p
Enter password: ************
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.12

mysql> ALTER user 'root'@'localhost' IDENTIFIED BY '123456'
  -> ;
Query OK, 0 rows affected (1.98 sec)

2.6 Log in with new password

Use command: mysql -u root -p

D:\Python\mysql-8.0.12-winx64\bin>mysql -u root -p
Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.0.12 MySQL Community Server - GPL

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

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:
  • How to install MySQL 8.0.28.0.msi on Windows (with pictures and text)
  • MySQL 8.0.25 installation and configuration tutorial under Windows 64 bit (most detailed!)
  • Detailed explanation of the problem of installing MYSQL5.7.24 under Windows Server 2012
  • Detailed installation process and basic usage of MySQL under Windows
  • Detailed introduction to the MySQL installation tutorial under Windows
  • Detailed tutorial for installing the unzipped version of mysql5.7.28 winx64 on windows
  • The latest version of MySQL 8.0.22 download and installation super detailed tutorial (Windows 64 bit)
  • MySQL 8.0.22 installation and configuration method graphic tutorial under Windows 10
  • MySQL 8.0.19 installation detailed tutorial (windows 64 bit)
  • MySQL 8.0.21 installation tutorial under Windows system (illustration and text)
  • MySQL 8.0.20 Installation Tutorial with Pictures and Text (Windows 64-bit)
  • Tutorial on installing MySQL 8.0.x on Windows

<<:  How to use Docker to build enterprise-level custom images

>>:  VUE implements token login verification

Recommend

The scroll bar position is retained when scrolling the vant list component

The scroll bar position is retained when scrollin...

MySQL 5.7 installation and configuration method graphic tutorial

This tutorial shares the installation and configu...

How to modify the user and group of a file in Linux

In Linux, when a file is created, the owner of th...

Detailed installation tutorial of Mysql5.7.19 under Centos7

1. Download Download mysql-5.7.19-linux-glibc2.12...

Share 10 of the latest web front-end frameworks (translation)

In the world of web development, frameworks are ve...

JS 9 Promise Interview Questions

Table of contents 1. Multiple .catch 2. Multiple ...

10 Deadly Semantic Mistakes in Web Typography

<br />This is from the content of Web front-...

Why not use UTF-8 encoding in MySQL?

MySQL UTF-8 encoding MySQL has supported UTF-8 si...

JavaScript to achieve product magnifying glass effect

This article shares the specific code of JavaScri...

How to install Maven automatically in Linux continuous integration

Unzip the Maven package tar xf apache-maven-3.5.4...

React error boundary component processing

This is the content of React 16. It is not the la...

Vue Element front-end application development to obtain back-end data

Table of contents Overview 1. Acquisition and pro...

JS ES new features: Introduction to extension operators

1. Spread Operator The spread operator is three d...