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

Win10 + Ubuntu20.04 LTS dual system boot interface beautification

Effect display The built-in boot interface is too...

JS implements city list effect based on VUE component

This article example shares the specific code for...

Let's talk about the difference between MyISAM and InnoDB

The main differences are as follows: 1. MySQL use...

Example code for implementing dotted border scrolling effect with CSS

We often see a cool effect where the mouse hovers...

JavaScript to implement mobile signature function

This article shares the specific code of JavaScri...

CSS Sticky Footer Implementation Code

This article introduces the CSS Sticky Footer imp...

How to set static IP in CentOS7 on VirtualBox6 and what to note

Install CentOS 7 after installing VirtualBox. I w...

How to use javascript to do simple algorithms

Table of contents 1 Question 2 Methods 3 Experime...

CSS to achieve compatible text alignment in different browsers

In the front-end layout of the form, we often nee...

Use of Docker UI, a Docker visualization management tool

1. Introduction to DockerUI DockerUI is based on ...

The principle and application of ES6 deconstruction assignment

Table of contents Array destructuring assignment ...

A simple way to achieve scrolling effect with HTML tag marquee (must read)

The automatic scrolling effect of the page can be...